Post deleted by Leesha
Post deleted by Leesha

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
Hi,
I'm enclosing a stripped down version of a database which is saved in 97 format as I couldn't get it small enough otherwise. The form will open to frmNameLookup. I've taken out all code. My problem with the form is that the text box [txtStatusID] should update to column 6 of lstName and it doesn't. I don't know why.
Thanks,
Leesha
Two things
lstName has only got five columns.
When you refer to a column in a listbox, the column numbers are zero based, so the sixth column is actually column(5)
Regards
John
Hi John,
When I put in column(5) I get a date, not the number that is in the last column. I'm confused.
Leesha
Are you trying to show the field StatusID?
StatusID is the seventh column in the query that provides data for the listbox, so if you give the listbox 7 columns statusID will then be in the listbox, and you can show it using column(6)
column(6) refers to the columns inthe listbox not the columns in the underlying query.
Regards
John
Oh God! I can't even believe I missed that! I've checked and rechecked and changed the form so many times trying to get it to work I never even looked at the column count! Time to put this away for a bit I think!
Thanks so much,
Leesha