K
Kicker
Guest
Depending on what data is contained in a table field, I want to reference different controls on my form. for example:
I have a userForm with the associated userTable. One of the fields in userTable is ControlName. For simplicity sake, lets say the field contents are "Label1", "Label2", etc. It could verywell be "Button1", "Button2", etc.
If I use a command button to run a sub, it the following code works:
[userform].[Label1].[text] = "This is a test"
However, since the userTable contains the "Label1" as the data from the ControlName field. How do I use the field contents?
[userForm].[me.recordset!ControlName].[text] = "This is a test"
I have tried just about every combination I can think of.
ttfn
Kicker
I have a userForm with the associated userTable. One of the fields in userTable is ControlName. For simplicity sake, lets say the field contents are "Label1", "Label2", etc. It could verywell be "Button1", "Button2", etc.
If I use a command button to run a sub, it the following code works:
[userform].[Label1].[text] = "This is a test"
However, since the userTable contains the "Label1" as the data from the ControlName field. How do I use the field contents?
[userForm].[me.recordset!ControlName].[text] = "This is a test"
I have tried just about every combination I can think of.
ttfn
Kicker