Clear subform entry when exit form?

Minnesota

Registered User.
Local time
Today, 11:15
Joined
Jun 23, 2009
Messages
22
I need to create (code or macro) a button on my form that will revert all entries under one field on a subform back to "No".

I have a form with a search function in it. The user can search for various parts of an address or name and click search. The results are shown in the subform. In this subform there is an option for to "assign" an entry (or 10). The user will then select the entries they want and click the preview report button. The report only shows the entries that are switched to "yes". When they have printed their report I need the "yes" selections to revert back to no so the next user doesn't ahve a lot of "yes" entries messing up their choices.

Is this possible? Does somebody have an example database of how to do this?

I appreciate the help.
 
Just run an update query in the form's On Close event to update the selections in the table back to false.
 
When I set this up it only reverts the selected entry back to "no". How to I get all of the entries back to "no"?
 
Create an update query to set the field to no and do not put any criteria on it.
 
I have the update Query in place and it works when I manually run it. Now how do I make it run on exit?

Sorry for my ignorance, I'm still learning a lot about Access. Your help has been invaluable.
 
In the form's On Close event put:

CurrentDb.Execute "querynamehere", dbFailOnError
 

Users who are viewing this thread

Back
Top Bottom