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!

SubRoutine and Function -- From After Event??

Status
Not open for further replies.

kptasteve

Programmer
Nov 2, 2002
43
0
0
US
This may seem like a DUH! question, but it just hit me. Say I have a Sub procedure named "popitup" that opens a form using VBA code. To call or run the subroutine or function routine, is to just put the name "popitup" in the area next to the event using the properties dialogue box?? Is it that simple and I have overlooked it all this time??

Steve Marcum PT
Programmer ( Learned in RBase)
 
It would be legal to put "=popitup()" in the event property, but the preferred way is to use a standard event (set the event property to "[Event Procedure]" and then click the "..." builder button to create an event procedure with a proper heading). Then, in the event procedure, you can Call Popitup.

The "=popitup()" syntax is supported for compatibility with early versions of Access. Microsoft may remove that support in a future release. That's why using the event procedure is preferred.

Rick Sprague
Want the best answers? See faq181-2886
To write a program from scratch, first create the universe. - Paraphrased from Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top