How to query one column in a multi column list box

S

St_man

I have a list box on a form that has two columns. I need to choose a line in
the box but only query using the value in one of the columns.
How can I do that. Can I write a criteria statement in the query design
view to only use that one column.
Any help is appreciated.
Thanks
 
C

Carl Rapson

Refer to columns other than the bound column of a list box with the Columns
collection:

listbox.Columns(1)

would be the 2nd column in the listbox (the columns are zero-based).

Carl Rapson
 
D

Duane Hookom

You can only reference the bound column of the list box using:
Forms!frmYourForm!lboYourControl
If you need to refer to another column, I would create a hidden text box in
the form that references the unbound column and then use the text box in your
query criteria.
 
Top