Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Time lapse between today's date and date entered

Status
Not open for further replies.

jh3016

Programmer
Jun 6, 2003
148
US
I need help in calculating days from current date.

2 fields:
[InstallDate] (user will enter a date they expect to install the product)

[DiffinDate] (this would be a field that would calculate how long it will be before product is installed.

So

If [InstallDate] is <= 30 days from today, enter "30" in [DiffinDate]

If [InstallDate] is >30 and <=60 days from today, enter "60" in [DiffinDate]

If [InstallDate] is >60 and <=90 days from today, enter "90" in [DiffinDate]

If [InstallDate] is >90 days from today, enter "more than 90" in [DiffinDate]

After that, I would like to color code

30 would be green
60 would be yellow
90 or greater would be red

Any help would be greatly appreciated.

Thanks.

 
Access also understands vbGreen, vbYellow and vbRed as values to give you the colors however; these constants may not be what you desire.

HTH,


Steve
 
Hi

If you need help with calculating dyas elapsed rather than how to use colours see DateDiff() function in help

Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
Website needs upgrading, but for now - UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top