calling a mainform subroutine from a subform

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
 
D

Dirk Goldgar

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
 
T

Tom Ross

Stumbled on one


Call Form_SpoolTasks.cmdWLetters_Click


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

Tom Ross

Thanks

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

Tom
 

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