Conditional Formatting

K

kirstie adam

Hi,

I have a form which is a continous form and shows line after line of
records.
I have 2 fields on it

[Survey Required] - it's a check box
[Date Survey Ordered] - a date field

If [Survey Required] is yes and [Date Survey Ordered] is blank i want [Date
Survey Ordered] to have red back color.

Can someone give me the coding for this?

At the moment i have:

If Me.Transport_Survey_Req_d = "-1" Then
Me.Transport_Survey_Results_Received.BackColor = 255
Else
Me.Transport_Survey_Results_Received.BackColor = -2147483643
End If

but this highlights each record red even if it shouldn't be!!

Thanks,

Kirstie
 
R

Ron2006

Actually it CAN be based on another control.

sit on the "Date_Surveyed" field and select conditional formating

Change the item on the left from "field value" to "Expression"

in the expression box enter:
[Transport_Survey_Req_d] = true AND isnull([Date Survey Ordered] )


then select the formating you want (the red background).

Ron
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top