Blank form On Load

stevekos07

Registered User.
Local time
Today, 08:25
Joined
Jul 26, 2015
Messages
174
I would appreciate any help with this.

I have a form which is used as an event log and check list. The form only needs to be edited as a once-off each day then an OnClose event macro saves the changes to a table via an Append query to record the information for that day.

What I want to do is to either reset the form to all blank records after the append query "backup" or to do this on open so we have a blank form at the beginning of each day.

Opening the form to a new record is not suitable as it opens to add a new record which is not what we want to do. We simply need the fields in the table (form) to be blank on open.
 
.. We simply need the fields in the table (form) to be blank on open.
Why do you want that, (if it is not for adding a new record), is your form unbound?
 
It is a bound form but I only use the form to temporarily record activity that will be saved to another table as a historical table. I have not tried using an unbound form to do this.

I have a table with a fixed number of records called tblBaseSignInOut. It is used to log when remote locations sign in on a daily basis to update messages for their clients. This table is the basis of the form frmBaseSignInOut. The form has an On Close macro which triggers an append query to another form called frmBaseSignInOutHistory.

The first form is just a way of enabling the tracking of the activity related to the bases. Once the day's activities are over the form can be reset to a blank form. This is what I want to do. I am unsure of the best way to do this. The issue is compounded by the fact that every user has an independent copy of the database front end, meaning that if the form contained in each copy of the form had an On Close event that reset the form, a user logging out prior to the end of daily operations could trigger the reset, which would not be good.

Maybe a button that manually resets the form (table) might be better for this?
 
This happens to me all the time!

After some head bashing the answer came to me.

The answer was to create an update query to set the Yes/No fields to No and the Text fields and Combo fields to Null. This update query will run after the append query saves the changed values to the history table. I can run the update query either manually or as an end-of-day macro run from an On Close event.
 

Users who are viewing this thread

Back
Top Bottom