open form on "new record" screen

Funkyaccess

Registered User.
Local time
Yesterday, 22:30
Joined
Oct 8, 2009
Messages
69
Hi,

I have a form with tabs and each tab contains a subform. How can I set this subform to start with a new record?
 
You can also use this:

Code:
Me.YourSubformControlNameHere.Form.Recordset.AddNew

Where YourSubformControlName is the name of the subform control on the main form which houses the subform.

See here for which name you use:

subformcontrol.png
 
thanks for both the options. wheres the best place to initialise the docmd/.addnew to goto the new record?
 
thanks for both the options. wheres the best place to initialise the docmd/.addnew to goto the new record?

On Load event of the subform.

So if you do that, then you will not want to use my code, but instead just use JBB's, or use

Code:
If Not Me.NewRecord Then
   DoCmd.RunCommand acCmdRecordsGoToNew
End If
 
Thanks both of you. I'm now getting the effect I was after.
 

Users who are viewing this thread

Back
Top Bottom