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

How to show all records for a date using criteria on general date fld? 2

Status
Not open for further replies.

tgikristi

Technical User
Jul 31, 2002
39
US
I have a report based on query and one of the fields in that query is in the General Data format. I want a way to filter the report or write a criteria for the report's query or something so that if a user enters a date in the MM/DD/YYYY format into an Open Event prompt that I have created, all the records stamped with that date are returned, but since the General date has the time stamp as well, I can't figure out how to write code that will just look at the date portion?

This must be so simple, but I can't figure it out...
Thanks,
tgikristi
 
Theres a load of ways to do this but you may try to utilize the sql between # 1HERE # and # 2HERE # .....

simply get the date value and append 00.00 before date
e.g 00.00 09/16/2002

then 2nd lee append 23.59 before same date for 2nd value
e.g 23.59 09/16/2002

so your statement would be like Select ..... between #00.00 09/16/2002# and #23.59 09/16/2002#

Hopefully , that should work

LK--<

 
tgikristi,

Try this, changing the prompt to what yours is......
Code:
Between ([Enter report date] & &quot; 00:01 &quot;) And ([Enter report date] & &quot; 23:59&quot;)
 
So simple, so helpful! Thanks very much LizardKingSchwing and CosmoKramer!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top