Date Dilema

D

DS

I have reports to run on a daily basis the problem is that on some days the
business is open after midnite which means that if I want to go back and run
a report from the past I would not only get the datas from the start day and
the data from after midnite which is fine but I would also get the data from
the morning all the way up to midnite which is basiaclly 2 days! Any
suggestions appreciated.
Thanks
DS
 
A

Al Campagna

DS,
Unless you are also capturing the Time of each record creation, you won't be able to do
that.
If you add a DOC (Date of Creation) Time stamp to each record, then you could filter
the report for whatever length you call a "day"
(ex. 1/1/07 @ 8:00am to 1/2/07 @ 7:59am)??
--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 
D

DS

Thats what I was afraid of! Now this DOC, whenever I go to filter it would
I have to add the time as well or can I do just the date?
Thnaks
DS
 
A

Al Campagna

DS,
Your DOC field can be automatically entered whenever you create a new record.
Add DOC field (Date/Time) to your table, and on the form's BeforeUpdate event...

Private Sub Form_BeforeUpdate(Cancel As Integer)
If (IsNull(DOC)) Then
DOC = Now
End If
End Sub

Date yields just the current Date... Now yields current Date & Time.

I have a sample 97 and 2003 file on my website (below) that shows how to set up a DOC
(DateOfCreation) and DOLE (DateOfLastEdit) as well as record some useful record
statistics.

--
hth
Al Campagna . Candia Computer Consulting . Candia, NH USA
Microsoft Access MVP
http://home.comcast.net/~cccsolutions

"Find a job that you love, and you'll never work a day in your life."
 

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