change text color when date changes

M

moon

Hi all,
I've posted this question before but didnt get any response so Im
reposting. I have date field in a continuous form that I want the
color to change when the dates change. For example if there are two
entries for 9/9/03 and 9/10/03 then the two rows should be of
different color. I know I can do this in conditional formatting but
somehow my expressions are not right.

Please advice,
TIA,
moon
 
A

Allen Browne

It's kinda messy to achieve what you want.

In order to make the comparison to the date in the "previous" row, you need
to bring the value of that date into the current row as well if you plan to
use conditional formattting. That means basing the form on a query. In the
query, use a calculated field to get the date of the previous row. This
article gives you four ways to do that:
http://www.mvps.org/access/queries/qry0020.htm

Now you have the previous value, you can use Conditional Formatting to
compare the current date to the previous date.

Unfortunately, all that falls apart if the user reorders the records in your
form, e.g. by clicking the A~Z toolbar button, as the query is no longer
returning the value of the "previous" record as viewed by the user.
 
M

moon

Hi,
Thanks so much for your response. If I want to do this
programmatically, without using conditional formatting,would it be
easier and less messy?


TIA,
Moon
 

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