I have a table with a yes/no field. I would like the field value to change from a yes to a no when I close the table. Effectively, deselecting the check box associated with the yes/no field on a form.
I have a table with a yes/no field. I would like the field value to
change from a yes to a no when I close the table. Effectively,
deselecting the check box associated with the yes/no field on a form.
Mary,
There is no way to do this if you are in Table view.
However, if you are using a Form, Continuous Form, or Form Datasheet
view, you can place code in the Form's Close event to set the Check Box
field to No:
CurrentDb.Execute "Update YourTable Set YourTable.CheckBoxFieldName =
0;", dbFailOnError
Each time the form is closed, all records will be reset to No.