[AccessD] Syntax for finding value of an item in a collection

Gustav Brock gustav at cactus.dk
Sat Apr 7 13:00:42 CDT 2007


Hi Barb

Couldn't that be:

varValue = Me.Controls(Split(colControls(1), "!")(2)).Value
or:
varValue = Forms(Split(colControls(1), "!")(1)).Controls(Split(colControls(1), "!")(2)).Value

/gustav

>>> BarbaraRyan at cox.net 07-04-07 18:07 >>>
I have a collection for control names (e.g., colControls) which contains certain controls (e.g. txtLastName) on a form (e.g. frmFormA).  For example,  colControls(1) =  "[Forms]![frmFormA]![txtLastName]".

Let's say that txtLastname currently contains the name "Smith.  What is the syntax for finding the VALUE of colControls(1) , i.e., "Smith"?

Thanks,
Barb





More information about the AccessD mailing list