Weekend Dates In A Different Color

  • Thread starter Charles L. Phillips
  • Start date
C

Charles L. Phillips

Hello,
I have been given the task of administration of an MS-Access 97/2003
database.
The date field has ALL the dates of the year in black. I want the database
to identify weekend dates & display them in another color. I want the
database to identify holiday dates & display them in a different color...
Can/will someone direct me to an example for this situation???


Thank you,
 
A

Allen Browne

In Access 2003 (but not 97), you can use conditional formatting to display
weekend dates in a different color.

In form design view, select the text box containing the date.
Choose Conditional Formatting on the Format menu.
Enter:
Expression Is ... Weekday([StartDate],7) <= 2
and click the color you want.

To do the same for public holidays, you would need a table of the public
holidays observed in your state/country. You could then use a DLookup()
expression in conditional formatting to see if the date is a holiday.

If this is a continuous form, or you have lots of date boxes to apply
conditional formatting to, you will notice the delay as Access performs the
DLookup()s.
 
C

Charles L. Phillips

Hello,
"Thank You"...
I will try this & get back to you...


Thank you,
--
Charles L. Phillips




Allen Browne said:
In Access 2003 (but not 97), you can use conditional formatting to display
weekend dates in a different color.

In form design view, select the text box containing the date.
Choose Conditional Formatting on the Format menu.
Enter:
Expression Is ... Weekday([StartDate],7) <= 2
and click the color you want.

To do the same for public holidays, you would need a table of the public
holidays observed in your state/country. You could then use a DLookup()
expression in conditional formatting to see if the date is a holiday.

If this is a continuous form, or you have lots of date boxes to apply
conditional formatting to, you will notice the delay as Access performs the
DLookup()s.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Charles L. Phillips said:
Hello,
I have been given the task of administration of an MS-Access 97/2003
database.
The date field has ALL the dates of the year in black. I want the database
to identify weekend dates & display them in another color. I want the
database to identify holiday dates & display them in a different color...
Can/will someone direct me to an example for this situation???
 

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