Open Sub form to new record

G

Guest

When I want to open a form to a new record I use DoCmd.OpenForm "frmXXXXX", ,
, , acFormAdd. In this case I will be opening a form to a specific record
(which is fine) and I want to open a subform on that form to a new record.
How do I do that?
 
G

Guest

On the Load event of the Main form, you can write the code

Me.[WriteTheSubFormControlName].SetFocus
Docmd.GoToRecord , , acNewRec
 
G

Guest

Thanks, Ofer, That did it.
--
Thanks for any assistance


Ofer said:
On the Load event of the Main form, you can write the code

Me.[WriteTheSubFormControlName].SetFocus
Docmd.GoToRecord , , acNewRec

--
\\// Live Long and Prosper \\//
BS"D


NNlogistics said:
When I want to open a form to a new record I use DoCmd.OpenForm "frmXXXXX", ,
, , acFormAdd. In this case I will be opening a form to a specific record
(which is fine) and I want to open a subform on that form to a new record.
How do I do that?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top