Filter by (1 Viewer)

Eddie Mason

Registered User.
Local time
Today, 08:48
Joined
Jan 31, 2003
Messages
142
I want to filter by two criteria:
The first Is based on an ‘unbound combo box’ [DateNo] containing the numbers 1 – 31 and when I use the following code in isolation it works perfectly:

Me.Filter = "DayNo = " & [DateNo]
Me.FilterOn = True
Me.Requery

Using a second criteria to find customers who pay by credit card:

Me.Filter = "BankAccount = 'Credit Card'"
Me.FilterOn = True
Me.Requery

Again in isolation this also works perfectly.

However when I try to combine the two so that I can filter by [DayNo] and customers who pay by ‘Credit Card’ I get an error. Can someone advise on this?

Kind regards

Eddie
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 00:48
Joined
Aug 30, 2003
Messages
36,127
Me.Filter = "BankAccount = 'Credit Card' And DayNo = " & [DateNo]
 

Eddie Mason

Registered User.
Local time
Today, 08:48
Joined
Jan 31, 2003
Messages
142
Hi Pbaldy,

Many thanks for your help it's now working perfectly.

Kind regards,

Eddie
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 00:48
Joined
Aug 30, 2003
Messages
36,127
Happy to help!
 

Users who are viewing this thread

Top Bottom