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

Macro referencing on Subforms

Status
Not open for further replies.

DBritter

Technical User
Jun 28, 2000
37
US
I first created created individual forms, but when I went to insert some of those forms as subforms the macros didn't work I could not figure out how to reference them in order to make them work. The macros are basically turning on and off the visible property on certain controls based on events within the subform.
 
The controls you are trying to manipulate on the subform must now be referenced as controls of the parent form via the subform window.&nbsp;&nbsp;<br><br>For example, if the parent form is called: frmMain<br>the subform window on the parent form is called: subWindow<br>the control is a command button called: cmdPrint<br>You refer to the command button on the subform like:<br><br>forms!frmMain!subWindow!cmdPrint<br><br>instead of: forms!frmNowASubform!cmdPrint<br><br>Give it a try. <p>-Chopper<br><a href=mailto: > </a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top