new record in navigation form

spinkung

Registered User.
Local time
Today, 00:31
Joined
Dec 4, 2006
Messages
267
hi i have a form in a navigation subform (access 2010) which i want to go to a new record on load.

I don't want to enable the data entry feature as i can't cycle other records??

I've come across this...

Code:
Private Sub Form_Open(Cancel As Integer)
    DoCmd.GoToRecord acDataForm, Me.Name, acNewRec
End Sub

..which works fine if i'm in the form directly. but if i'm in the nav form i get an error saying the form is not open?

can anyone help.

Thanks
 
Don't try to reference the form name, just enter the new record argument;

Code:
Private Sub Form_Open(Cancel As Integer)
    DoCmd.GoToRecord , , acNewRec
End Sub
 

Users who are viewing this thread

Back
Top Bottom