How to refer to a Control variable's properties

jguscs

Registered User.
Local time
Today, 01:02
Joined
Jun 23, 2003
Messages
148
The following works for a text box control called "TextBox":
Dim CurrentControl As Control
Set CurrentControl = Forms!Switchboard.TextBox
CurrentControl = "Message"

But let's say I want to alter the color of the font from the default (black) to red... how can this be accomplished?
(This does not work):
CurrentControl.ForeColor = RGB(255, 0, 0)

However, this does work (not that I want to make the control invisible...
CurrentControl.Visible = False
 
Nevermind, must have typed something in wrong...
or Access 2000 is buggy.
It works now.
 

Users who are viewing this thread

Back
Top Bottom