I am calling a subroutine passing the control's name:
Check_status(ActiveControl.Name)
Private Sub Check_status(controlname As String)
If Me.ostatus.Value = "Can" Then
controlname.backcolor = 255
End If
I get a compile error of invalid qualifier. on controlname
Now I know that controlname has the value of the control, in
this case "TestID" how do I get VB to interpret the above
assignment as TestID.backcolor = 255
I am in effect passing a variable of a variable name.
Bob Schmid
bob_schmid@hmis.org
330-746-1010 ext. 1347
Check_status(ActiveControl.Name)
Private Sub Check_status(controlname As String)
If Me.ostatus.Value = "Can" Then
controlname.backcolor = 255
End If
I get a compile error of invalid qualifier. on controlname
Now I know that controlname has the value of the control, in
this case "TestID" how do I get VB to interpret the above
assignment as TestID.backcolor = 255
I am in effect passing a variable of a variable name.
Bob Schmid
bob_schmid@hmis.org
330-746-1010 ext. 1347