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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Between functionality with time stamp misses last date transactions

Status
Not open for further replies.

EdAROC

Programmer
Aug 27, 2002
93
US
I know this has been asked before...

Created a report which includes a totals query with Max on a time stamp field (transactions entered during the business day) - objective is to 'consider' all transactions for the group to be as of the last transaction date. Example: Multiple shipments of an order would be "classified" based on the last date. Group on Order#, Max on ShipDate (which is a time stamp).

Then there's a query to capture this and other data for the report.

The user selects the date range, on a form, using pop-up calendars, so the date value for the end date is, effectively, like 9/30/06 00:00:00. So, using the Between [form...BeginDate] And [form...EndDate] on the query, all the entries for the last date are not included (unless the last transaction was at exactly midnight).

I'm thinking of standardizing on one of two solutions (out of many):
1. In the VBA coding after dates are checked for being valid add 23:59:59 to the End Date value (which is currently 00:00:00). How do I change the time on a date value?

2. In the query change the end date value in the Between phrase. How do I change that?
 
EndDate + #23:59:59#

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks for the suggestions.

The + #23:59:59# worked. And it's simple and straight forward, being in the report query criteria.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top