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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

class procedures

Status
Not open for further replies.

csf

MIS
Dec 22, 1999
5
US
I have an Access 97 form with a multipage tab control. Is there a way to access class procedure code from another existing form. I know I could put this in a module, but is there a direct call to the class procedure.
 
No I think you can only share subs between forms in a Module.<br>
Thats why they made modules<br>
Subs in froms are local only.<br>
This is so you can have command1_click in more than one form.
 
Personally I've never done this but the documentation says that procedures declared in Form or Report Class modules are automatically public, and can be called from anywhere within the database, although the safest way to document is to declare it as public and then call it by &quot;pathing&quot; it. The example of syntax for calling it is shown as:<br>
Sub PublicFormProc()<br>
Call Forms.frmHello.cbfIAmPublic<br>
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top