How to query one column in a multi column list box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top