Clearing a checkbox

S

SharonInGa

I used a macro to refresh to clear the filter in a form. There are also
checkboxes in the form and Refresh is not resetting the checkboxs for each
record. How can I both clear the filter and the checkboxes?
 
F

fredg

I used a macro to refresh to clear the filter in a form. There are also
checkboxes in the form and Refresh is not resetting the checkboxs for each
record. How can I both clear the filter and the checkboxes?

You can reset all the check boxes in your table using an Update query:
CurrentDb.Execute "Update YourTable Set YourTable.[CheckBoxField] =
0;",dbFailOnError

You really don't need to 'clear' a filter.
Just set the FilterOn property to False.
Using code within the form:
Me.FilterOn = False
 
Top