New record

D

Daniel

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
 
S

S Price

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... ;-)
 
A

Alex Dybenko

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
 
D

Daniel

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
 

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

Top