"Dead spot" in ListBox

A listbox of Expenses I am Populating from a table has a strange problem, The second row of expenses has a column1 which will not show the expense. As can be seen all other expenses appear correctly. I’ve checked the code and it seems to work I looked for a possible line that would explain the text not appearing in that line. I’ve changed out the listbox and it didn’t help.

Ive loaded the listbox onto my website; I don’t seem to be able to upload here. To see the problem kindly go to: jimbackusdesign.com. The listbox with the problem is shown there.

It someone can explain why this is occurring I’d appreciate your help. Thank you. (it’s 12:30 AM so I’m calling it quits for the evening

Do you have any code in the PaintCellText event?

Do you have white text on a white background?

Code?
Is there a carriage return before the first letter of line 2’s text?

Your line holds a Return character… so only the second line is displayed (you know, the one that is empty)… :wink:

Also:

you can Paste images here…

Good morning Eric, Beatrix, Jeff and Emile,

Thanks for the suggests. I’m going to check your suggestions and will respond when I figure this out.

I looked into all your suggestions and none appeared to be the problem. What I then did was add a new listbox and copied the code. I ran the program and the new listbox loaded correctly, row2, column 1 appeared with the other rows.

The difference was that the new listbox was not connected to the code that tried to load columns 2, 3, 4. When I deleted the load instructions for these columns row 2, column 1 appeared. I have copy of the code I deleted but it appears that the listbox is fine.

Thank you for your help. I appreciate having others willing to help.

A follow up to what caused problem:

I had added a column in the listbox to show the ID which moved the Expenses from column 1 to column 2. The code that loaded the cost of expenses was not changed. I wanted all cells that had a $0.00 entry to be blank so I wrote code to make all $0.00 values cells blank. Column 2 cells would be blank. As the value loaded after the Expense loaded into the same cell, the Expense was deleted therefore the Expense cell in row 2 became blank. I hope I explained that well enough. When I moved the code to row 3 for a delete the problem was resolved.

Learning point: Don’t write code late at night when you’re tired.

Thank you for your efforts.

1 Like

I couldn’t follow the explanation but if it’s sorted, don’t try to explain further.
It’s unlikely to be of help to anyone in the future. :slight_smile:

2 Likes