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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

continuous frm - value determine cntrl bkcolor

Status
Not open for further replies.

TruthAndBeauty

Technical User
Jun 4, 2001
38
US
Afternoon,
I need for each record in a continous form to dispaly a color (1 of 4) reflecting a value associated with the record. I've research and experiemented but ...no go. Perhaps you know a solution.

Scenario:
Table1 has only three fields:
rec_num (value:autonumber)
category (value: null, 1, 2, or 3 )
employee (value: text string)

Table1 contains more than one record.

The records are displayed on a continous form.
Instead of displaying the category as a blank, 1, 2, or 3 I need to display a color
( null = white, 1=red, 2= yellow, 3= green).

I placed 4 controls on the form with the intent to control the 4th control's backcolor with the record's (invisible) category value.

Ive tried code on form Open, Load, Activate events. I've looped thru Me.RecordsetClone. There doesn't seem to be an appropriate event on the control itself. If I get the backcolor to change, it changes the backcolor on all the records.

I've searched Tek-tips and didn't see this question/answer. Any help??? Thanks.
 
If you are using Access 2000, then you can use conditional formatting. You will find it on the menubar and it is intended for your purpose on a continuous form. It may be limited to 3 different values but check it out.
 
Thank you! Thank you! Thank you!

It couldn't be simpler or a better fit.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top