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

Query ?

Status
Not open for further replies.

JoeHank

Programmer
Feb 13, 2003
7
US
Hello, can anyone help me with a problem I'm having with a query. What I want to do is to use the ItemData property to of a list box as the criteria for a record to be selected in a query.

Thanks for taking time to read, any help is appreciated very much.
 
I have used this in the past and had no problem but I have always used the bound column as the item:

Criteria:
Forms!frmSomeName!SomeControl.ItemData(ZeroBasedvalue)
 
Tanks Trendsetter, for responding so quickly, I was able to resolve my problem using the rowsource property of the list box in as query criteria box using the expression builder. it looks something like this:

[Forms]![formName]![ListBoxName].Rowsource

And then on my form I have a cmd button that when the user clicks it will open the query and find the record based on the item(s) in the list box. I use a for loop to iterate thru the list box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top