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

Allow function to be called by multiple forms 1

Status
Not open for further replies.

48Highlander

Technical User
Feb 8, 2004
119
CA
I have a function in a module that will be called by one of three forms. The control names I am interested in referencing on all three forms are the same. I was hoping to cut down on the amount of code by using something like the following:

Code:
If frmName & ".cboEntityType.Column(1)" = True Then
   [COLOR=green]' some more code[/color green]
endif

where the form name (frmName) is one of the variables of the function call.

This doesm't work so does anybody have a nifty code trick for me?

Bill J
 
Perhaps this ?
Code:
If Forms(frmName).Controls("cboEntityType").Column(1) = True Then

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Sometime I can't see the forest for the trees. Thanks for your help ONCE AGAIN PHV!

Bill J
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top