Hi,
I want to create a variable that will = the name of a control then use that variable to get the value of the control.
something like this:
On the form I have a text box [919000Name] 'Actually many different named text boxes[919100Name],[919110Name]...
In the onclick of a button:
For Each ctl In pge.Controls
If Not ctl.Value = "" Then
title = "Me![" & ctl.value & "Name]" ' Where ctl.value = 919000
Me![PlDwgTitle] = (Me![ProjectName] & " " & title) ' Which would make Me![PlDwgTitle].value = Me![919000Name].value
End If
Next ctl
My real question is how to make the "title" variable be the same as typing Me![919000Name]?
Hope this all makes sense.
Thanks
paul
I want to create a variable that will = the name of a control then use that variable to get the value of the control.
something like this:
On the form I have a text box [919000Name] 'Actually many different named text boxes[919100Name],[919110Name]...
In the onclick of a button:
For Each ctl In pge.Controls
If Not ctl.Value = "" Then
title = "Me![" & ctl.value & "Name]" ' Where ctl.value = 919000
Me![PlDwgTitle] = (Me![ProjectName] & " " & title) ' Which would make Me![PlDwgTitle].value = Me![919000Name].value
End If
Next ctl
My real question is how to make the "title" variable be the same as typing Me![919000Name]?
Hope this all makes sense.
Thanks
paul