View Full Version : ForeColor and Backcolor


Capilano
10-24-2001, 11:54 AM
In the Form View of a Continuous Form, is there any way to change the ForeColor and/or BackColor depending on the control's value? This is easily done when the Form is set as a Single Form.

Eg.
If Control1.Value = 12 Then
Control1.ForeColor = 255
End If

This syntax works well in a Single Form view, but it changes all of the Control1's in a Continuous view.

You can achive this objective using VB and I was just wondering if you could with VBA.

Any Suggestions would be appreciated.

Thanks

Pat

tjs206
10-24-2001, 12:15 PM
If you are using 2000, try using the Conditional Formatting property that is new with 2000.

On your continuous form, select Conditional Formatting from Format on the toolbar. Under Condition Select if value is equal to than, then the number (12). From there you can specify which color you want the forecolor to be.

Hope this helps.

tjs206

[This message has been edited by tjs206 (edited 10-24-2001).]