I have a selection of records in my database that I would like to filter out by using a check box. To clear my selection after I am done with viewing these records, is there an easy way to build a macro to reset these records?
Thank you,
Larry
I have a selection of records in my database that I would like to filter out by using a check box. To clear my selection after I am done with viewing these records, is there an easy way to build a macro to reset these records?
Thank you,
Larry

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
Does the check box correspond to a Yes/No field in the table? If so, you can create an update query that clears the check box in all records:
- Create a new query in design view, based on the table.
- Add the Yes/No field to the query grid.
- Select Query | Update Query.
- In the 'Update to' line, enter False (or No).
- Save this query.
You can double click the query from the database window to run it. You can also create a macro to do so, or run the query from VBA code. If you want to suppress the warning messages that you are about to run an action query and that you are about to update n records, you can use the SetWarnings action in a macro (DoCmd.SetWarnings in VBA):
<table border=1><td>Action</td><td>Argument</td> <td>SetWarnings</td><td>No</td> <td>OpenQuery</td><td>name_of_query</td> <td>SetWarnings</td><td>Yes</td> </table>