Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Go Sub to an On click procedure

Status
Not open for further replies.

JesseH

MIS
Aug 9, 2001
63
0
0
US
I need to execute a procedure defined as an on_click from an "On open event". If the name of the onClick is "cmdPrint_Click()", how do I execute it. gosub cmdprint_click does not work. Gosub cmdprint_click() does not work. Goto does not seem to work either. Any ideas.

Thanks

JesseH
 
Yes, you would do it something like this:

Code:
Private Sub Form_Open()
  Call cmdPrint_Click
End Sub

This the same as what Molby put, I just did sort of an example of exactly how you were asking - On Open event..

Stephen [infinity]
"Jesus saith unto him, I am the way, the truth, and the life:
no man cometh unto the Father, but by me." John 14:6 KJV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top