Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date parameters not pulling all data

Status
Not open for further replies.

juliesmomma

Technical User
Jun 3, 2002
36
0
0
US
I have a report based on a query with "Between to and from dates". I want to pull a report for May, 05/01/05 thru 05/31/05. I have records on 5/31/05. However, when I enter those dates in the parameter, I missing the records from 05/31/05. Why does it do this?

Any info would be appreciated.
Thanks,
April
 
Please post your query. Thanks!

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I expect your date field also contains the time value. A field value of 5/31/05 4:00:00 PM is not between 5/1 and 5/31.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
I have set my [Date] field to short date. In my query, my criteria for [Date] is Between [Enter From Date:] And [Enter Thru Date:]. I have had this same thing happen in several of my databases so I'm not sure what I'm doing to cause the problem.

dhookom: I looked in my table and it is only capturing the short date for each record.

Thanks!
 
I went back and looked at my table again. I clicked in the [Date] field and it IS capturing the time. I'll work on that and see if that corrects the problem. Thanks for pointing that out.
 
Try
Between [Enter From Date:] And [Enter Thru Date:]+.9999

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
That didn't work for me. I wrote an update query and fixed the dates so that they didn't have times. Worked like a charm.

Thanks for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top