Results 1 to 2 of 2
Thread: Record Selection (2000)
2005-03-21, 19:41 #1
- Join Date
- Apr 2002
- Burlington, Washington, USA
- Thanked 0 Times in 0 Posts
Record Selection (2000)
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?
2005-03-21, 20:08 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Re: Record Selection (2000)
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):
<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>