-----Original Message-----
Hmmmm . . . in a similar test it works for me - perhaps the problem is that
I inadvertantly changed the control name to Loc1? Should be:
dim strCtlName as string
strCtlName = "Loc01"
Forms!frm_ViewRankSum.Controls(strCtlName).ControlSource = "JVYJV3"
--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
Jim said:
Sandra,
Using your suggestion results in the following error:
Type-declaration character does not match declared data
type.
Any other ideas?
-----Original Message-----
Using a variable -
dim strCtlName as string
strCtlName = "Loc1"
Forms!frm_ViewRankSum.Controls (strCtlName).ControlSource = "JVYJV3"
--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.
Jim Shortslef wrote:
The line of code below changes the control source of Loc01
to JVYJV3.
Forms!frm_ViewRankSum.Controls!Loc01.ControlSource
= "JVYJV3"
How can I change the control name (Loc1) to a variable?
Jim
.
.