Subform new record setfocus

C

Candiz

I have a mainform, subform and a subsubform within the subform. The
mainform has a one to many relationship to the subform and subform one to
many relationship to the subsubform. I need a command button to add a new
record to the subform to an existing record on the mainform. I am able to
setfocus on the subform but my problem is I'm not able to reset the subform
for a new record when the button is clicked. I am new to Access VB. I
appreciate any assisance from the experts. Thanks in advance.

Canice
 
S

Sprinks

Hi, Candiz.

Try:

Me!YourSubFormName.SetFocus
DoCmd.GoToRecord , , acNewRec

HTH
Sprinks
 

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