Using IN syntax in a Filter

ybg1

Registered User.
Local time
Today, 08:26
Joined
Jan 3, 2009
Messages
20
Hello there!

The following code works fine

G_StrWhere = "[Group]=" & G_Group_Code & " AND " & "[EntryDate]=" & SQLDate(G_Greg_Date)

Me.Filter = G_StrWhere
Me.FilterOn = True

I would like to get 2 Groups together in the first part using the syntax " IN"
e.g. (4,6 IN G_Group_Code)
Anyone knows how to do it?

Thanks

progress.gif
 
Hello there!

The following code works fine

G_StrWhere = "[Group]=" & G_Group_Code & " AND " & "[EntryDate]=" & SQLDate(G_Greg_Date)

Me.Filter = G_StrWhere
Me.FilterOn = True

I would like to get 2 Groups together in the first part using the syntax " IN"
e.g. (4,6 IN G_Group_Code)
Anyone knows how to do it?

Thanks


progress.gif

Your Syntax for using IN is backwards. It should be:

Where YourFieldValue {NOT} IN ( Value1, Value2, ..., ValueLast )
 

Users who are viewing this thread

Back
Top Bottom