Filter with mulitple criteria

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have searched the groups but didnt get it work.
I am trying to filter a form with three criteria:
1.BATCH NO SHOULD BE BETWEEN XX AND XXX
2.DRAFT NO IS NULL
3.COUNTRY= ME.COMBO22

strLinkCriteria = "[BATCHNO]= BETWEEN "05/*" AND 06/*" AND [DRAFT] IS NULL
AND [COUNTRY]=ME.COMBO22"

I want to put the code on the After update event of the control combo22.

any help on this issue?
 
Have you tried creating a query and looking at the SQL of that query?

A couple things jump out...

If you are looking for values in a date range, you'll need to tell Access
you are comparing to a date (using the "#" delimiter).

If your field is a text field, you'll need to tell Access to look for text
(using the quote delimiter).

Try the query approach to get a look at how Access creates SQL to do what
you're describing.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Back
Top