Colour Coding Cell/Text Background

P

PaulF

Hi,
I have a table with date information in it, if a particular date is
within a defined range I wish to colour code the individual cell colour red.

On the dataset view I can not find a property that allows me access to an
individual table cell to change its colour.
I've also used Text boxes on a continuous form, using the Forms OnCurrent
Event with a bit of VBA code which tests the date and sets the text box back
colour. Unfortunately it turns all the date text boxes red not the individual
record whose date is in the defined range.

Anybody any ideas?
 
A

Allen Browne

Assuming Access 2000 or later, use Conditional Formatting. It's on the
Format menu, in form design (or on the Design tab of the ribbon in A2007.)

Set Condition 1 to something like this:
Expression Is ... Abs(DateDiff("d", [SomeDate], Date())) < 31
 

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