How to chage a field color to red in the access 2003 report? (1 Viewer)

youyiyang

Registered User.
Local time
Today, 14:24
Joined
Apr 7, 2009
Messages
49
hi!

i am programming an access 2003 database for my company's warehouse. Could anybody know how to change a field color to red if this field is not same as the coresponding field when generating a report?

For example,
Type, Huafeng Quantity, WareHouse Quantity ...

if the warehouse quantity is not the same as the huafeng quantity, then the warehouse quantity's color is red to alert the people to be noticed.

Any suggestions would be very appreciated!
:)
 

CJ_London

Super Moderator
Staff member
Local time
Today, 06:24
Joined
Feb 19, 2013
Messages
16,553
use conditional formatting. Can't remember how it is done in 2003, but think it is pretty much the same as current versions.

In form design view, click on the control and select conditional formatting. Then for the Huafeng Quantity control you would need select

Field value is...not equal to...[WareHouse Quantity]

then select the red background colour

click OK etc

Note that referring to [WareHouse Quantity] a) is the name of the field in your recordsource, not the name of the control on your form which displays it and b) you must use square brackets even you there are no spaces or non alpha numeric characters.
 

youyiyang

Registered User.
Local time
Today, 14:24
Joined
Apr 7, 2009
Messages
49
Thank @bob_fitz and @CJ_London very much for your kind help!
My problem was solved by your method of conditional format.
 

Users who are viewing this thread

Top Bottom