View Single Post
  #1  
Old April 24th, 2008, 02:44 PM posted to microsoft.public.access,microsoft.public.access.forms,microsoft.public.access.formscoding
Michael Kintner[_2_]
external usenet poster
 
Posts: 28
Default HELP: Pressing Buttons in SubForm from a Main Form

I have a main form with two sub forms within the Main. When I press a
button in the main form I would like it to also press a button in the sub
forms. How to I call the sub form button to execute from within the Main
form?

frmMain has button butProcessRec
subFrmA within frmMain has button butAddRecA
subFrmB within frmMain has button butAddRecB

'
' Code in frmMain trying to press a button in the subform
'
Private Sub butProcessRec_Click()

' Press button in subFrmA within frmMain called
subFrmA.butAddRecA_Click()
???

' Press button in subFrmB within frmMain called
subFrmB.butAddRecB_Click()
???

End Sub

Thank you in advance for your help!
Mike