Solved

Access 97 - General Date Format

Posted on 2004-08-23
3
1,089 Views
Last Modified: 2007-12-19
Good Afternoon,

I have an Audit table that stores the date and time that a record was changed using the General Date Format (in the table). I am creating a report that will show all the records changed between dates (the user chooses on a form with unbound fields for entering the date). In my query I am using the following criteria:

Between [Forms]![frmChangeReports]![txtStartDate] And [Forms]![frmChangeReports]![txtEndDate]

Problem is that if a record was changed on 8/23/2004 9:17:05 AM and on my search form I put 08/01/04 to 08/23/04 I don't get the record referenced above.

Is there an easy solution to this (other than changing the format of the date in the table)?

Let me know if you need more information.

Lena
0
Comment
Question by:LenaWood
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Accepted Solution

by:
ornicar earned 125 total points
ID: 11875923
Simply add 1 day to the user's input using DateAdd function:

Between [Forms]![frmChangeReports]![txtStartDate] And DateAdd("d",1,[Forms]![frmChangeReports]![txtEndDate])

To be very precise we should add 23h 59m only, but noone is working at 00:00 :)

0
 
LVL 18

Expert Comment

by:Data-Man
ID: 11876190
You could do it like this if you like

Between [Forms]![frmChangeReports]![txtStartDate] And Cdate(Clng([Forms]![frmChangeReports]![txtEndDate]) + .999988425925926)


The value .999988425925926 is really 23:59:59

Mike
0
 
LVL 10

Author Comment

by:LenaWood
ID: 11881189
Mike - I get the same message that the calculation is too complex :-(

Ornicar - your suggestion seems to do just want I wanted too.  Thanks!

Lena
0

Featured Post

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question