TextBox.BackColor Property
Access Developer Reference |
Gets or sets the interior color of the specified object. Read/write Long.
Syntax
expression.BackColor
expression A variable that represents a TextBox object.
Remarks
The BackColor property contains a numeric expression that corresponds to the color used to fill a control's or section's interior.
You can set the default for this property by using a control's default control style or the DefaultControl property in Visual Basic.
To use the BackColor property, the BackStyle property, if available, must be set to Normal.
Example
The following example uses the RGB function to set the , BackColor, and ForeColor properties depending on the value of the txtPastDue
text box. You can also use the QBColor function to set these properties. Putting the following code in the Form_Current( ) event sets the control display characteristics as soon as the user opens a form or moves to a new record.
Visual Basic for Applications |
---|
|