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

Multiple Entries to Search

Status
Not open for further replies.

GiovanniB

Programmer
Jul 16, 2001
3
US
Hi,

How can I have for one command button to open a form by searching for data in two or more text boxes or fields from one main combo box?

Here's what I am facing for instance:

stLinkCriteria = "[Color]=" & "'" & Me![Combocolors] & "'"

Is there a way were I can add [color2], [color3], etc to the above code ?

I thank anyone who can help me find a solution to this predicament.

Thanks a bunch,

Gio
 
Hi Gio!

See the following code for multiple text boxes:

stLinkCriteria = "[Color] = '" & txtFirstColor & "' Or [Color] = '" & txtSecondColor & etc.

And for multiple columns from one combo box:

intRow = Me!ComboBox.ListIndex
stLinkCriteria = "[Color] = '" & Me!ComboBox.Column(0, intRow) & "' Or [Color] = '" & Me!ComboBox.Column(1, intRow) & etc.

hth
Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top