You are nearly there! When you are viewing the events tab of the property sheet, you can't just paste my code directly in as Access then thinks it is the name of a macro, hence the error. Here's what to do:
Delete the code you have pasted into the OnOpen line, then click the build button to the right of the line- the one with 3 little dots in it. Select Code Builder and you will end up with the code screen, with an event already created- starts Private Sub and ends End Sub. You need to paste my code in between these two lines so it looks like this:
Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec
End Sub
now save and close the code window and give it a try...
Another way would be to modify the 'Data Entry' property of the form and change it to 'Yes'. In the case of mrf1xa's recommendation when you open the form it will immediately go to a new record. After that you may then use the regular navigation buttons the go previous or add new or whatever. With this alternative the user will be in data entry mode continuously. Each obviously has it's advantages so you need to match it to your requirements.
Steve King Growth follows a healthy professional curiosity
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.