If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

FlexGrid Issue, visual basic 6, VB6

Hello everyone,
I am having an issue with the Flexgrid, when I have data shows up on the flexgrid, it seems like it is skipping the rows where the first column is missing data, it would not write to the rest of cells in that row. I am attaching the code as well as the screen print of the flexgrid. The flexgrid is meant to pull stock information for sql, this is for a financial industry. As you could see from the screenprint, the the third row has data in the other columns even if there are no shares or weight. Can you see if there is somewhere in the code that specifies that skip the row if there are no data in the first column, please help, thanks. P.S. Please check the attached image file also, thanks.

Re: FlexGrid Issue, visual basic 6, VB6

Your code is very difficult to read, not formatted properly and lots of stuff that has been commented out makes it hard to follow.

You have several different Select case blocks that are basically the same and from the looks of it each has only one case in it. Each of these are also with in an if block that is doing the same test a bunch of times. It would appear that 1 If block would be enough to check the recordcount. The purpose of Select Case is to have more than one case otherwise you would just use an if statement.

Re: FlexGrid Issue, visual basic 6, VB6

Hello, thanks for your suggestion, but when I do what you sugguested me after cleaning up the code, it would not write to the next row, previously the flex screen use to order the funds by the amount of shares, so it will write from bottom to first, but now I am trying to have the funds static, like I have attached on the screen shot, please help, thanks. flexgridissue#2.txt

Re: FlexGrid Issue, visual basic 6, VB6

I'm not really sure what you are trying to do there. The code looks better but is still hard to read due to improper formatting. As for the Select Case the purpose of using a select case statement is to do different things based on different values, typically a case block should have at least 2 or more cases. If your first code was doing what you want or close then perhaps you do not need a select case at all a simple if statement would do the trick.

That said I do not see any looping so maybe that is an issue but I can't be sure because I can't really follow your code and I do not know what you are trying to do.