Open to new record???

  • Thread starter Thread starter Rick's News
  • Start date Start date
In the subform's class module:


Private Sub Form_Open(Cancel As Integer)
DoCmd.GoToRecord , , acNewRec
End Sub
 
How do I get my subform to open to the new record???

Thanks in advance!

Rick

Two ways:

- Open the Form properties of the subform, and set its Data Entry
property to True. This is a bit limited: it lets you add new records
but will not allow you to see old records.

- Or, put a line of code in the main form's Current event:

Me!subformcontrol.Form.GoToRecord acNewRecord
 
Thanks Sandra!


Sandra Daigle said:
In the subform's class module:


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


--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.

Rick's News said:
How do I get my subform to open to the new record???

Thanks in advance!

Rick
 
Back
Top