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

Trying to build a generic routine...using a value passed to a form

Status
Not open for further replies.

Goot

Programmer
Aug 4, 2005
86
US
I have a series of check boxes, that when the user checks it, I open a form. I pass in the name of the check box to the second form via OpenArgs. I want to force the check box to unselected. But I want to make the routine generic.
Instead of setting the field like this line,
'Forms!frmAccountDev!chkIncumbency_F = 0

How can I set the value to 0 using the passed in field name. In the old days using clipper I could do something like this by prefixing the value with the address of operator "&" .
Forms!frmAccountDev!&strValue (passed in from openargs)

Can I do this in VBA?





 
Forms!frmAccountDev.Controls(strValue)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top