Open Sub form to new record

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
On the Load event of the Main form, you can write the code

Me.[WriteTheSubFormControlName].SetFocus
Docmd.GoToRecord , , acNewRec
 
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?
 
Back
Top