423,818 Members | 2,266 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 423,818 IT Pros & Developers. It's quick & easy.

The form view opens with the first record

P: 9
I entered 5 records and closed the database, however, when I reopen to start data entry it starts from the first record. This posses a risk that mistakenly the entry operator may overwrite data. Is there a way to fix this problem, thus every time I open the database it starts from the record where I left?

Thanks
Aug 11 '06 #1
Share this Question
Share on Google+
4 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
In the On Load event of the form in question add the following code:

Private Sub Form_Load()

'This will take you to the last record on the form
DoCmd.GoToRecord acActiveDataObject, "FormName", acLast

End Sub
Aug 12 '06 #2

MMcCarthy
Expert Mod 10K+
P: 14,534
Actually if you just need the form for Data Entry you can do either of the following:

Private Sub Form_Load()

'This will take you to a new record on the form
DoCmd.GoToRecord acActiveDataObject, "FormName", acNewRec

End Sub

Or you could just set the Data Entry property of the Form to 'Yes'
Aug 12 '06 #3

P: 9
Thanks a lot. As I mentioned earlier that I am a novice in Access, hence you may find some questions as 'stupid'.

Where to find the 'on load' event? I was looking for it but did not find.

Thanks
Aug 14 '06 #4

MMcCarthy
Expert Mod 10K+
P: 14,534
In the design view of the form, click outside of the main form area. Ideally, click on the little grey square at the top left edge of the form. Right click here and go to properties. Make sure the Heading of the properties says Form.

Go to the Event tab and scroll down until you see On Load. In the box put [Event Procedure] and then click on the button with the dots beside it. The Form_Load event procedure should open and you just have to add the code.
Aug 14 '06 #5

Post your reply

Sign in to post your reply or Sign up for a free account.