By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,296 Members | 1,460 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,296 IT Pros & Developers. It's quick & easy.

Count Down days.

P: 69
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.
Jun 29 '07 #1
Share this Question
Share on Google+
2 Replies


JConsulting
Expert 100+
P: 603
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
Jun 29 '07 #2

P: 69
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
Jun 29 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.