Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / September 2005

Tip: Looking for answers? Try searching our database.

Call proceedure in a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
franky - 14 Sep 2005 18:04 GMT
How do i call (reference) a public proceedure in a form from another form?

Thanks in advance!
franky - 14 Sep 2005 19:05 GMT
I figured it out.  Hopefully this is the correct way to do it.

Dim frm as form

Set frm = Forms!myForm
frm.ProceedureName

Thanks

> How do i call (reference) a public proceedure in a form from another form?
>
> Thanks in advance!
David C. Holley - 14 Sep 2005 19:47 GMT
Actually that's not neccessary you can do it with

Call Form_subfrmCodedRemarks.setSQLStatement("Confirmation")
     [form module name].[procudure name] (any required parameters)

> I figured it out.  Hopefully this is the correct way to do it.
>
[quoted text clipped - 8 lines]
>>
>>Thanks in advance!
Marshall Barton - 14 Sep 2005 19:31 GMT
>How do i call (reference) a public proceedure in a form from another form?

A form's module is a Class Module and procedures in a class
module are methods of the class.  From that generalization,
the syntax would be:

Function:
    xx = Forms!otherform.procedurename(arglist)
Sub:
    Call Forms!otherform.procedurename(arglist)
or
    Forms!otherform.procedurename arglist

Note that otherform must be open before it becomes a member
of the Forms collection.

If otherform is not open, you can use the syntax
Form_otherform.procedurename, but that is not the same thing
in cases where the procedure relies on data within the form
or its module.

Signature

Marsh
MVP [MS Access]

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.