GoToRecord on Sub-Forms

dsellers1

Registered User.
Local time
Today, 02:19
Joined
May 19, 2009
Messages
39
I am working with a multi-user database in which a user will enter their data throughout an hour and submit the record before starting on the next hour. Each hourly form has two sub-forms within. These sub-forms have a "GoToRecord" macro that points them to a New record on load. I have noticed that when users submit one form and transition to the next form, it will sometimes auto-populate these sub-forms with existing data from the table.

I have a hunch that the reason for this is due to the 2-3 users submit their data at the same time so access pulls up what it thinks is a new record but it's not. However, I can't understand it if the sub-forms are set to go to a New Record. Is there anything I can do to avoid this other than have them close and reopen the form (which always works)?
 
What do you mean it "points them to a New record on load"? do you mean a blank form ie for data entry/New record????

If you want a new record, then tell Access when the form opens ie

Code:
DoCmd.GoToRecord , , acNewRec
 
I have DoCmd.GoToRecord , , acNewRec in my subforms. And I have no issues when I pull them up individually. The problem is when I load the main form, which include these two subforms. The subforms sometimes contain existing data. That is what I'm trying to avoid
 
Set subforms to Data entry from the properties>Data Tab>Data entry = Yes
 
Sure enough, it was set to no. Thanks for the help! Now to test...
 

Users who are viewing this thread

Back
Top Bottom