Connecting Tech Pros Worldwide Forums | Help | Site Map

Count Down days.

Member
 
Join Date: Jun 2007
Posts: 64
#1: Jun 29 '07
Am using Access '97
This is going on a form.


Hi there, would like to know if there is a way to count down the days from when a user enters a date in a specific date field. If so, can someone please show me some code??

In other words, if I enter today's date in a Signature Date control, is there a way to have the system count down the days that are left??? Afterward, I would like to have this date recorded in a table for reporting purposes.

Thank you in advance for your time and assistance.

JConsulting's Avatar
Expert
 
Join Date: Apr 2007
Location: Houston
Posts: 601
#2: Jun 29 '07

re: Count Down days.


Quote:

Originally Posted by KMEscherich

Am using Access '97
This is going on a form.


Hi there, would like to know if there is a way to count down the days from when a user enters a date in a specific date field. If so, can someone please show me some code??

In other words, if I enter today's date in a Signature Date control, is there a way to have the system count down the days that are left??? Afterward, I would like to have this date recorded in a table for reporting purposes.

Thank you in advance for your time and assistance.

Ok, Hate to say it but your question is confusing. If I enter today's date, then count is 0. If you enter a future date, then you use a simple datediff() function to subtract the number of days from today to that future date.

Expand|Select|Wrap|Line Numbers
  1. MyDate = datediff("d",StartDate, EndDate)
  2.  
You didn't mention how you want that displayed. And the part about recording the date in a table...you're going to have to store it to begin with in order to do the datediff() against it.

Can you clear up the confusion?

J
Member
 
Join Date: Jun 2007
Posts: 64
#3: Jun 29 '07

re: Count Down days.


Quote:

Originally Posted by JConsulting

Ok, Hate to say it but your question is confusing. If I enter today's date, then count is 0. If you enter a future date, then you use a simple datediff() function to subtract the number of days from today to that future date.

Expand|Select|Wrap|Line Numbers
  1. MyDate = datediff("d",StartDate, EndDate)
  2.  
You didn't mention how you want that displayed. And the part about recording the date in a table...you're going to have to store it to begin with in order to do the datediff() against it.

Can you clear up the confusion?

J

Hi there, yes, my question is this >>> As the end-user needs to finish entering data associated with one SRI (Primary Key) within 7 days, I need to be able to have a means to display that if I enter today's date (06/28/2007) in the date control on the form, then tomorrow when I open the database I need to be able to see a message that says 6 days left, and so on. If I open the database 4 days later, I need to see a message that says 3 days left.

Am not sure if this is possilbe.

Thank you for your asistance.

Kathleen
Reply