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!

Calling procedures across modules...

Status
Not open for further replies.

GWhiz

Programmer
Dec 16, 1999
49
US
Thanks for your response, Liz. Yes, I had declared the procedure "Public" -- and that's why I'm so puzzled. When I still got the same "...not defined..." error msg, I realized I needed professional help(!). Procedure was originally an event procedure triggered by a control on the main form (Form A). All the the actions/statements in that procedure relate to controls on Form A, and it is not really accessed by multiple forms, so is convenient to leave it as part of Form A rather than create a separate module. I know there are other ways to get the job done rather than open a pop-up (Form B), but pop-up forces the user to make a decision (thereby setting a variable which determines how the procedure acts) -- and the darned thing oughta work anyway! So I'm determined to prove I'm smarter than a few lines of code(!). So far the code is winning. Is there something I might be missing in the declarations section that would help Form B find the procedure in Form A? I've been operating on the assumption that "Public Sub..." is all that's necessary...
 
go to one of the modules and use the Global command<br>
click the Declarations area<br>
and put it below this statement<br>
<br>
Option Compare Database<br>
Global X As Integer &lt;- Example<br>
<br>
<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top