Move to Main Form from Sub

R

rap43

I have form with sub form when I click save on the sub form I need to go to a
new record on the main form. Can someone help.

Thanks
 
B

Beetle

Private Sub cmdSave_Click ()

DoCmd.RunCommand acCmdSaveRecord
Me.Parent!SomeControl.SetFocus
DoCmd.GoToRecord acDataForm, "frmYourMainForm", acNewRec

End Sub
 

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

Similar Threads


Top