Search form based on 2 cbo's

sonny

Registered User.
Local time
Today, 10:25
Joined
Mar 2, 2004
Messages
140
Can someone tell me how to set the linkCriteria to search on 2 different cbo's
I'm tring to bring up all records that have what a user selects, in either of the cbo's. Just so you know, a record will never have the same value in both cbo's.
Code:
stLinkCriteria = "[CatCODE]=" & "'" & Me.CatCODE & "'" Or "'" & Me.CatCODE2 & "'"
 
Try:

Code:
stLinkCriteria = "[CatCODE]= '" & Me.CatCODE & "' Or [CatCODE] = '" & Me.CatCODE2 & "'"
 
Thanks RichO, I tried this but it returns a blank form. I edited it abit because the 2 cbo's are on my main form and the search is from a popup form....
Code:
stLinkCriteria = "[CatCODE]= '" & Forms![frmMainData]![CatCODE] & "' Or [CatCODE] = '" & Forms![frmMainData]![CatCODE2] & "'"
 
So then does it work now after your changes?
 
RichO said:
So then does it work now after your changes?
Sorta, it doesnt find the recod(s) though.... I made sure I was selecting ones that existed in one of those cbo's in the main tbl records....
 

Users who are viewing this thread

Back
Top Bottom