Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

vb control values for continuous form

Status
Not open for further replies.

maxcess

IS-IT--Management
May 23, 2004
6
US
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
 
Hi!

The trick with doing conditional formatting in continuous forms, is to not program, but use the conditional formatting from the format menu. Available from version 2000.

Roy-Vidar
 
Righto. That worked, and for a subform the expression was Forms![frmStaff]![sfrmStaffList]![chkInactive]=True.
Thanks...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top