New record

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

I have a form with a subform with another subform in it. When an event is
trigger I would like to create a new record in the 2nd subform and switch the
active record displayed in the 2nd subform to the new blank record. How can
I achieve this? (I can't seem to get anything to work today)

Thanks

Daniel
 
I haven't tried this but I'm pretty confident it should
work.

Create a public sub routine in the 2nd form:

Public Sub sAddRecord()
DoCmd.GoToRecord , , acNewRec
End Sub

Now call this from the event you need it in:

Forms!MainForm!Form1!Form2.sAddRecord

Give it a try and let me know how you get on, hope it
works.

Ps. This may not be the best way of doing it but if it
works... ;-)
 
You can add record using append query, then requery 2nd subform, using
recordsetclone property find new record and set focus to it using bookmark
property

HTH
 
I'm affraid I can't seem to get it to work. I keep getting an error message
that stated the it doesn't support this type of property.

Anymore ideas?

Daniel
 
Back
Top