View Single Post
  #3  
Old June 3rd, 2010, 09:48 PM posted to microsoft.public.access
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Calculating time

On Thu, 3 Jun 2010 12:23:06 -0700, Dave
wrote:

I have a single table database that has a drop down box of 60 days, 90 days,
and 180 days.

I want to calculate to time from the date of entry in the database to count
down from the days that was selected in the drop down box.

How would I go about doing this please be detailed and if you can include a
simple of the code that I would need in order to complete the task.


I suspect you'll use the DateDiff() function - press Ctrl-G to open the VBA
editor (to connect to the right Help file) and search for Help on DateDiff.

It's not clear to men what you mean by "count down". Do you want to calculate
the date 60 (or 90 or 180) days after the date in a date/time field in the
table? If so a Query with a calculated field

CountDownDate: DateAdd("d", [Forms]![YourForm]![YourDropdownBox], [datefield])

will do the job. If that's not what you want please post an explanation or an
example.
--

John W. Vinson [MVP]