Continuous form conditional row color in Access 2003 (1 Viewer)

Margarita

Registered User.
Local time
Today, 16:57
Joined
Aug 12, 2011
Messages
185
Hello, I know there are a lot of threads on this topic out there. Having read a lot of them, I am still not sure whether what I want is possible in the 2003 version of Access.
Is it possible to base the background color of a row of a continuous form on a condition in Access 2003? From what I've read, this can only be done with detail section events like On Paint that are not available in Access 2003. I know there is code available in some threads to set up an alternating row color in Access 2003. But this isn't quite what I need. I need the background color of an entire record in the detail section to be conditional on the value of one of the fields. If anyone knows if this is possible in 2003, I would be very grateful for a link that describes how to do so.

Thank you!


 

apr pillai

AWF VIP
Local time
Tomorrow, 02:27
Joined
Jan 20, 2005
Messages
735
Yes, this is possible in continuous form with conditional formatting, without any coding.

Since, you have not provided any field names, let us assume you have field names like: FIELD1, FIELD2, FIELD3, FIELD4.........FIELD10.

FIELD3 = "APPLE" OR "ORANGE" OR "GRAPES" OR ....

If FIELD3 value is "ORANGE" in any record on the continuous form those records' field background should change to the required color (each field separate color or same color, the choice is yours). But you have to individually format those fields once.

  1. Select FIELD1 in form Design View and select Conditional Formatting option.
  2. On the conditional formatting dialog box, select Expression is under Condition 1 and type the expression: [FIELD3]="ORANGE" and select the required Background color you like from the Color Pallette, click OK to come out.
  3. Repeat steps 1 & 2 for FIELD2.
  4. Select FIELD3, where the actual value "ORANGE" is, slect Field Value is in Condition 1 and select Equal To from the next control and type the value "ORANGE" in the third control.
  5. Set the backgroud color/Font Color as you like.
  6. Repeat step-1 & step-2 for FIELD4 TO FIELD10.

A sample image is attached. Conditional Formatting based on expression [Dept]="TBA".
 

Attachments

  • conditional formatting.jpg
    conditional formatting.jpg
    98.4 KB · Views: 1,120

Margarita

Registered User.
Local time
Today, 16:57
Joined
Aug 12, 2011
Messages
185
Yes, this is possible in continuous form with conditional formatting, without any coding.

Since, you have not provided any field names, let us assume you have field names like: FIELD1, FIELD2, FIELD3, FIELD4.........FIELD10.

FIELD3 = "APPLE" OR "ORANGE" OR "GRAPES" OR ....

If FIELD3 value is "ORANGE" in any record on the continuous form those records' field background should change to the required color (each field separate color or same color, the choice is yours). But you have to individually format those fields once.

  1. Select FIELD1 in form Design View and select Conditional Formatting option.
  2. On the conditional formatting dialog box, select Expression is under Condition 1 and type the expression: [FIELD3]="ORANGE" and select the required Background color you like from the Color Pallette, click OK to come out.
  3. Repeat steps 1 & 2 for FIELD2.
  4. Select FIELD3, where the actual value "ORANGE" is, slect Field Value is in Condition 1 and select Equal To from the next control and type the value "ORANGE" in the third control.
  5. Set the backgroud color/Font Color as you like.
  6. Repeat step-1 & step-2 for FIELD4 TO FIELD10.
A sample image is attached. Conditional Formatting based on expression [Dept]="TBA".

Wow! This is so fantastic! I was looking for this forever! I had no idea this was so simple- no code required or anything.
Thank you so so much!
 

Users who are viewing this thread

Top Bottom