vb for controls in continuous form

maxcess

Registered User.
Local time
Today, 07:32
Joined
May 24, 2004
Messages
15
Is it possible to use If..Then to change control colors on a continuous form? It works for a single form, but using a checkbox for a value to color other controls sets all controls in a continuous form the same.

Example:

If Me.chkInactive.Value = True Then
Me.Firstname.ForeColor = vbRed
Me.Lastname.ForeColor = vbRed
Else
Me.Firstname.ForeColor = vbBlack
Me.Lastname.ForeColor = vbBlack
EndIf

(note: A Select statement would work too for this....)

In a continuous form would set all the Firstname/Lastname fields red. Is it possible to request the True value from the underlying query instead if that would do the trick?

...max
 
If you are using A2K or above try conditional formatting.
 
___ said:
If you are using A2K or above try conditional formatting.


Righto. That worked, and for a subform the expression was Forms![frmStaff]![sfrmStaffList]![chkInactive]=True.
Thanks...
 

Users who are viewing this thread

Back
Top Bottom