Open to new record???

  • Thread starter Thread starter Rick's News
  • Start date Start date
R

Rick's News

How do I get my subform to open to the new record???

Thanks in advance!

Rick
 
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
 

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

Back
Top