Return value for each day between dates

G

Guest

I have a database for travel expenses. One of my tables is tblTrips. I have
created one field in the form for TripStartDate (using the MS Date & Time
Picker Control Version 6.0) and another field for TripEndDate (using the MS
Date & Time Picker Control Version 6.0). I need to calculate the expenses,
i.e., breakfast, lunch, dinner, cab, etc. for EACH day. I have a subform
with all the expenses for each day, but I need to generate a record for each
day in between the dates specified as TripStartDate and TripEndDate
automatically. Each trip will have a different amount of days. For example,
if the TripStartDate was 01/01/05 and the TripEndDate was 01/15/05, I need to
calculate the number of days between the days and then return a record, which
includes the daily expenses, for Jan. 1, Jan. 2, Jan. 3, etc. for example.

Thanks for any help.
 
G

Guest

I did look in the Help field under dates and between. I see how you can
choose how many "Sundays" occur in the time period of my between dates.
However, I want the values to List ALL days of my between dates. For
instance. If my start dates is May 5, 2005 and my end date is May 15, 2005,
the value that I want returned is:

Thursday 5
Friday 6
Saturday 7
Sunday 8
Monday 9
Tuesday 10
Wednesday 11
Thursday 12
Friday 13
Saturday 14
Sunday 15

Am I missing this somewhere? I have also looked under the MVP websites and
everywhere else I can think of. If you could be just a little bit more
specific I would appreciate it. Thanks.
 
L

Larry Daugherty

Hi Sharon.

I haven't checked in for a few days so I hope you've already found a
solution. My assumption was that if you are accumulating trip
expenses you'd have to have a record for each date from the beginning
through the ending date.

I now have the impression that you're looking for a handy means of
creating a day record for each day from the beginning date through the
ending date. Is that the case?
 
G

Guest

Sorry, I did not see your response until today. That is exactly what I would
like to happen, but when I asked my Access teacher he told me that Access
would not do that. That I would have to input each date individually. Do
you know something that would do this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top