Clearing Data Entry (1 Viewer)

Valentine

Member
Local time
Today, 08:26
Joined
Oct 1, 2021
Messages
261
I have a subform with a few text boxes I have set the form to data entry, but i wan the form to clear the data to input new data after saving. Do I have to make a VBA code with a button to save or is there a properties box I can change to clear the text contents to input new data?
 

Gasman

Enthusiastic Amateur
Local time
Today, 12:26
Joined
Sep 21, 2011
Messages
14,038
Mine clears when I tab off the last control?
 

Valentine

Member
Local time
Today, 08:26
Joined
Oct 1, 2021
Messages
261
I ended up putting in a button with an event that's just 1 line :
Code:
DoCmd.GoToRecord , , acNewRec
I couldn't trust my users to know to hit tab after filling out the text boxes so now they hit a save button I created that clears the text boxes for them.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Today, 07:26
Joined
Feb 28, 2001
Messages
26,996
That is actually probably a better approach anyway. According to Murphy's Law, that which CAN go wrong WILL go wrong. If your users had the chance to do the wrong thing, they would. So by changing the process to remove the chance of error, you did yourself a major favor.
 

Gasman

Enthusiastic Amateur
Local time
Today, 12:26
Joined
Sep 21, 2011
Messages
14,038
I have been adding many records to a DB of mine.
Tabbing through the controls is the fastest way I have found for data entry when adding new record time and time again.

As you are in Data Entry mode, then
Code:
DoCmd.GoToRecord
is all you need for your button.
 

Users who are viewing this thread

Top Bottom