Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / November 2005

Tip: Looking for answers? Try searching our database.

Weekend Dates In A Different Color

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Charles L. Phillips - 19 Nov 2005 04:57 GMT
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,
--
Charles L. Phillips
Allen Browne - 19 Nov 2005 08:54 GMT
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.

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Hello,
> I have been given the task of administration of an MS-Access 97/2003
[quoted text clipped - 3 lines]
> database to identify holiday dates & display them in a different color...
> Can/will someone direct me to an example for this situation???
Charles L. Phillips - 19 Nov 2005 17:48 GMT
Hello,
"Thank You"...
I will try this & get back to you...

Thank you,
--
Charles L. Phillips

> In Access 2003 (but not 97), you can use conditional formatting to display
> weekend dates in a different color.
[quoted text clipped - 25 lines]
> > database to identify holiday dates & display them in a different color...
> > Can/will someone direct me to an example for this situation???
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.