Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combobox: Using non-bound column data on selection 1

Status
Not open for further replies.

VicM

Programmer
Sep 24, 2001
444
US
Folks,
Is it possible to access a non-bound column's data from a selected record in a combobox?

I have a combobox containing 3 columns of data; the 1st column is the bound column containing a unique record number and is not visible; the second column is visible and contains the name associated with the unique number; and the third column is also visible and contains a boolean indication as to whether the record is active or archived.
So a record in the dropdown box might look like:

Smith, John | Yes

The hidden 1st column contains the unique record locator.

What I'm asking is: is it possible in code, say the AfterUpdate event of the combobox, to access the 'Yes' or 'No' that might be in the 3rd column?

I've tried: Me.myCombo.Column(2).Value (assuming base 0).

But I get an error saying 'Object required'.

Any suggestions?

Thanks
 
I think it is just
Me.myCombo.Column(2)

This returns an actual value not an object. So it does not have a value property and thus the error.
 
MajP
You were correct. Thanks a bunch!
Vic
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top