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 / July 2006

Tip: Looking for answers? Try searching our database.

how to make a date change colors

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mliedel - 31 Jul 2006 14:11 GMT
I am tring to build a expression. To changed a date color. I have a form with
a subform. The subform is a service record, which has a service date and next
service date due(1 year from Service date). The form also has a next service
date due.In the form next service date due I want to be green if not due and
red if due or past due.I also have current date on the form. I bin playing
around with the IIF function but can't seem to get it to work.
Rick B - 31 Jul 2006 14:16 GMT
Just use the built-in conditional formatting feature.  While in design-view,
select the control you want to format, then click the "Conditional
Formatting..." link in the Format menu.  You can then set the various
conditions and colors.

Signature

Rick B

>I am tring to build a expression. To changed a date color. I have a form
>with
[quoted text clipped - 6 lines]
> red if due or past due.I also have current date on the form. I bin playing
> around with the IIF function but can't seem to get it to work.
mliedel - 31 Jul 2006 15:01 GMT
I put in condition 1 field value is  > 365 red and condition 2 is < 365
green, but the date just  stays red on any date I put in.

> Just use the built-in conditional formatting feature.  While in design-view,
> select the control you want to format, then click the "Conditional
[quoted text clipped - 11 lines]
> > red if due or past due.I also have current date on the form. I bin playing
> > around with the IIF function but can't seem to get it to work.
Rick B - 31 Jul 2006 16:26 GMT
A date can't equal 365?  What type of field are you using here?  If it is a
date field, then you have to compare it to some date.  If your service due
is a date field and you want to locate any record where that date is coming
up in the next 30 days, for example, you'd put something like...
<Date()+30

If you want to find items that are between the current date and 30 days from
now, you'd use something like:
Between Date() and Date()+30

If you want to find past due items, you'd use something like:
<Date()

Hope that helps.

Signature

Rick B

>I put in condition 1 field value is  > 365 red and condition 2 is < 365
> green, but the date just  stays red on any date I put in.
[quoted text clipped - 18 lines]
>> > playing
>> > around with the IIF function but can't seem to get it to work.
 
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.