Colour Change on wrong data

Xenix

Registered User.
Local time
Today, 10:47
Joined
Oct 8, 2001
Messages
124
Hello,

I would like to change the colour of the back ground of the cell (field name) when data is wrong on a report. I have the following code which worked before on a form but seems to be a problem in a report:

If Me.SCHED_DATE <> Me.Committed Then
Me.SCHED_DATE.BackColor = 255
Else
Me.SCHED_DATE.BackColor = 65280
End If

Doe's anyone know of different code or a section to place this code where it will work :confused: ?



Kind regards

Mike
 
Depending on which version of Access you are using you could try conditional formatting - right click the field in design view to format by criteria.

Is in 2002 not sure about other versions
 
Use the Detail On Format event, and check the names of your controls
 
Thank you Rich,

that works fine. Strange thing is first time it did not do anything but now it works after checking as you said.


Thank you

Mike
A2k
 

Users who are viewing this thread

Back
Top Bottom