Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Macros / July 2005

Tip: Looking for answers? Try searching our database.

Combining two filtering macros

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rhysickle - 13 Jul 2005 13:06 GMT
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
JackP - 13 Jul 2005 15:36 GMT
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)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.