Open to new record???

S

Sandra Daigle

In the subform's class module:


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

John Vinson

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
 
R

Rick's News

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
 
Top