Combining two filtering macros

R

Rhysickle

I have two macros for two unbound text boxes on a form.

Each macro applies various filters depending on what is entered in its
particular text box - the macros are set to run "on exit" from the text box.

Say I enter "EM" in text box 1, this will filter for all schools in the East
Midlands

BUT if I then enter "Primary" in the other text box (i.e. looking for
primary schools in the East Midlands) it brings up every primary school in
the country.

Is there a "filter only the records currently on display" command I can put
in my macros to solve this problem?

Any help much appreciated
 
J

JackP

set them both to use the same macro, and combine the two criteria - but allow
for one or the other to be blank

for example something like

WHERE (Field1 = Box1 OR Box1 = NULL) AND (Field2 = Box2 OR Box2 = NULL)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top