G
Guest
Hi,
I want to create a function to change the fore colour of a specified control
on a specified form, but get an error when trying to use a variable with the
WITH statement:
Form mousemove event calls the function.
Private Sub Text1_MouseMove()
Call Change_Control_Colour("Forms!Form1","Text1")
End Sub
Public Function Change_Control_Colour(strForm, strControl AS String)
With strForm & "!" & strControl
.Forecolor = 255
End With
End Function
Can anyone help? (the code above is an example and may not work!)
Cheers,
Steve.
I want to create a function to change the fore colour of a specified control
on a specified form, but get an error when trying to use a variable with the
WITH statement:
Form mousemove event calls the function.
Private Sub Text1_MouseMove()
Call Change_Control_Colour("Forms!Form1","Text1")
End Sub
Public Function Change_Control_Colour(strForm, strControl AS String)
With strForm & "!" & strControl
.Forecolor = 255
End With
End Function
Can anyone help? (the code above is an example and may not work!)
Cheers,
Steve.