Automatically resetting values in a yes/no field

  • Thread starter Thread starter Rosa Edwards
  • Start date Start date
R

Rosa Edwards

I am creating a user interface for an access database that
will allow users to select student names for a report
which is then generated by selecting a command button.
This has to be extremely simple as these are non-Access
users, so I have displayed the names with a check box
linked to a yes/no field. They choose the names, it saves
the record before they leave the field, they click on the
command button, they print the report. Easy as pie.
Except ... I would like to be able to reset the field's
values upon exiting the form so that the next time it is
opened, no names have been checked. There is no need to
save the reports or anything like that - no need to save
the previous selections except for printing the report. Is
there a way to reset a yes/no field's value in the manner
I am talking about? Thanks.
 
Rosa,
Code the Form's Close event:
CurrentDb.Execute "Update YourTableName Set YourTableName.CheckBoxName =
0;", dbFailOnError

Close the form, lose the check marks.
Change the above table and field names to your actual ones.
 
Thanks Fred, works like a charm!
-----Original Message-----
Rosa,
Code the Form's Close event:
CurrentDb.Execute "Update YourTableName Set YourTableName.CheckBoxName =
0;", dbFailOnError

Close the form, lose the check marks.
Change the above table and field names to your actual ones.
--
Fred

Please reply only to this newsgroup.
I do not reply to personal e-mail.





.
 
Back
Top