
Originally Posted by
StGermain
Hello. Sorry for the beginners question.
I have a "Contacts Query" which selects certain records.
I would like to create a button on my "Contacts" form that will apply the "Contacts Query" as a filter . . . and only show those few records that meet the "Contacts Query" criteria.
What's the easiest way to do this?
Then another button to "CLEAR QUERY" . . . when clicked, it will remove the query filtering . . . and once again show ALL the records.
Thanks
Hi!
In Click event of "AddFilter" button:
Code:
Me.RecordSource="qryContacts"
In Click event of "RemoveFilter" button:
Code:
Me.RecordSource="tblContacts"
To code the Click event of a button, in design view, right click on the button and choose "Build Event...". Paste the lines of code above between Sub and End Sub of each relevant click event procedure.