Where condition 2 conditions

james_halliwell

Registered User.
Local time
Today, 18:50
Joined
Feb 13, 2009
Messages
211
Hi All,

I have a subform where have set a macro to open another form when i click on the line, It filters the other form perfectly, i would really like to filter it even further if possible i have only ever done it with on condition so dont know what to put for 2

in the openreport argument i placed the below code to filter to the account name, how could i add a second filter so i can filter on 812 brand aswell

="[AccountName]= '" & [AccountName] & "'"

does anyone know how i could do it

Many thanks
 
By using AND/OR you can narrow down your filter, for your situation something like:
Code:
="[AccountName]= '" & [AccountName] & "' AND [Brand] = " & "812" [COLOR="SeaGreen"]'if it's a fixed nummeric value[/COLOR]
="[AccountName]= '" & [AccountName] & "' AND [Brand] = '" & [Brand] & "'"[COLOR="SeaGreen"]'if it's a text value from a field[/COLOR]
 
Thats fantastic worked a treat many thanks for both of your suggestions

have thanked for your help

cheers
 

Users who are viewing this thread

Back
Top Bottom