Clearing Data Entry

Valentine

Member
Local time
Today, 15:10
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?
 
Mine clears when I tab off the last control?
 
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.
 
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.
 
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

Back
Top Bottom