Open Sub form to new record

N

NNlogistics

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?
 
O

Ofer

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

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

NNlogistics

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?
 
Top