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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

use content of list box as criteria in Query?

Status
Not open for further replies.

TimSlape

Technical User
Jun 1, 2001
18
0
0
US
I don't know much of anything, and I certainly don't know how to use the content of a list box in a form as the criteria in a Query. I'm sure it's just a matter of syntax and punctuation, but my efforts have failed. The Query is used by a Word merge to create reports.

Thanx in advance...
 
If the value is in the "Bound Column" of the listbox you just have to address the listbox. If the value is in any other column you have to address that column.

Example with one form and the value in the "Bound Column":
Forms!fTestform!lstListBox

Example with subform (don't forget ".Form" and that it is the name of the subform control you should adress and not the name of the form in the subform control):
Forms!fTestform!fuTestForm.Form!lstListBox

Example to address an other column:
Forms!fTestform!lstListBox.Column(2, Forms!fTestform!lstListBox.ListIndex)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top