need to add a OR clause ot an IF statement

travismp

Registered User.
Local time
Today, 13:28
Joined
Oct 15, 2001
Messages
386
Code:
If IsNull(DLookup("Result", "tbl_HISTORY", "ClientCode = '" & Me.CustomerCode & "' AND Result = 'USA'")) Then
        Me.Detail.BackColor = -2147483633
    Else
        Me.Detail.BackColor = 255
    End If

So this says if my client is from the USA then make my form go red. I want to make a small tweak to say if my client is from USA OR CANADA go red. So I only need to add the or clause after ~ Result = 'USA'")) ~ but I cannot get the correct code to work. Can anyone help? thanks.
 
tRY:
"ClientCode = '" & Me.CustomerCode & "' AND (Result = 'USA' OR Results = 'CANADA')"
 

Users who are viewing this thread

Back
Top Bottom