calling a mainform subroutine from a subform

  • Thread starter Thread starter Tom Ross
  • Start date Start date
T

Tom Ross

I have a button 'cmdWLetters' on the main form 'SpoolTasks' Beneath the
button is a subroutine 'cmdWLetters_click()'

I want to call that routine from the doubleclick event of a control
'weldletters' on a subform 'TasksWithNames'

I can't figure out the syntax to call that subroutine from the subform. (It
works simply form a control on the main form


Private Sub weldletter_DblClick(Cancel As Integer)

cmdWLetters_click

End Sub

Tom
 
Tom Ross said:
Stumbled on one


Call Form_SpoolTasks.cmdWLetters_Click

Change the declaration of the procedure "cmdWLetters_Click" on the main
form from Private Sub to Public Sub. Then you can write:

Me.Parent.cmdWLetters_Click
 
Stumbled on one


Call Form_SpoolTasks.cmdWLetters_Click


Any others that would work? Since you are here already... :)
 
Thanks

It was indeed the lack of 'Public' declaration that had me trying all sorts
of Mes forms dots and bangs

Tom
 
Back
Top