Combo/List columns > 1 are null?

SarahHall

Registered User.
Local time
Today, 21:53
Joined
Jan 15, 2011
Messages
32
Hi,
I've tried searching for this question here to no avail, so sorry if this is a repeat.

I have combo/list boxes with multiple columns and have no problems referring to columns 0 and 1 in VBA. If I try referring to any columns greater than this (ie 2, 3, 4, etc) however, it always produces a null value even though that shouldn't be the case.

I've previously worked around this issue by using a SQL query instead of columns in Combo/List box, but this is really starting to frustrate! It doesn't seem to be happening on a particular form within my project, although this is the first project I have tried to use more than 2 columns on a combo/list, so not sure if it's a db problem.

I'm using Access 2002 on Windows XP and can't seem to find anyone else having this issue.

I'd really appreciate any help on this issue. Thanks
 
Thank you.

Unfortunately I'm not able to share the whole db with you, but I have created a copy as an example for you. AfterUpdate on Teamcbo should update two text boxes with columns 1 and 2. Column 1 to TeamIDtxt works fine for me, but column 2 to CuurDepttxt does not. It doesn't make sense!

I'm hoping it is a 'Reference' issue or something equally as simple.
 

Attachments

The problem was that you had the Combo's Column count set to one, so there was only one column. Therefore there was only the one column (other than your bound column, which was column 1, very unusual :confused:) and a reference to column 2 was producing a Null result

I've set the column count to 3, and the column widths to 5cm; 0cm; 0cm

I believe that it now works as intended.
 

Attachments

oh wow - thank you. I knew it had to be something silly that I had overlooked.

Many many thanks for taking the time to look at this for me.
 

Users who are viewing this thread

Back
Top Bottom