Call Proc on Sub Form from Main Form

music_al

Registered User.
Local time
Today, 20:40
Joined
Nov 23, 2007
Messages
200
Hi

Im trying to call control event (click procedure) on a Sub Form from a Main Form.

Ive tried various syntax on this page but I cant get it to work.

Ive tried all of these...

Call frmAppointments.btn_AddToOutlook_Click
Forms!frm_Holding![frmAppointments].Form.btn_AddToOutlook_Click
Me.frmAppointments.Form!btn_AddToOutlook.Click
Me.frmAppointments.Form.btn_AddToOutlook_Click

Any help would be appreciated.

Thanks in advance


Al
 
Last edited:
Hi
You may like to check that the proc you are trying to call has been declared as Public and not Private.
 
Hi

Im trying to call control event (click procedure) on a Sub Form from a Main Form.

Ive tried various syntax on this page but I cant get it to work.

Ive tried all of these...

Call frmAppointments.btn_AddToOutlook_Click
Forms!frm_Holding![frmAppointments].Form.btn_AddToOutlook_Click
Me.frmAppointments.Form!btn_AddToOutlook.Click
Me.frmAppointments.Form.btn_AddToOutlook_Click

Any help would be appreciated.

Thanks in advance


Al
Hi

If you still have problems, you could always place the code in the btn_AddToOutlook_Click into a separate public routine and then you can call it from both

Cheers

Nidge
 

Users who are viewing this thread

Back
Top Bottom