Please Help!!! Macro required to select new record in Subform

K

K

Hi all, I have Forms in my database like (see below)

MainForm
SubformA in MainForm
SubformB in SubformA
Command Button on SubformA

I have below macro on command button

Private Sub Command1_Click()
Me.SubB.SetFocus
DoCmd.GoToRecord , , acNewRec
End Sub


When I open Form "SubformA and click button which is on "SubformA,
macro works fine and it takes me to new record on "SubformB" which is
in "SubformA. But when I open "MainForm" and click button of
"SubformA" then macro don’t work. I want to open "MainForm" which
got two Subforms "SubformA" and "SubformB" within eachother and i want
macro to select new record of "SubformB" by click the button of
"SubformA". Please can any friend help.
 

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