Parameter: Date and Time Question

jefflab1

New member
Local time
Today, 04:32
Joined
Jul 11, 2015
Messages
7
I want the person running a report to be asked to input the start date and time and the end date at time. I know I can set a parameter within the query and place it in the Criteria box.

I have tried the following, but it keeps on asking for the same input a second time:

Between [Startdate and time mm/dd/yyyy hh:nn] and [Enddate and time mm/dd/yyyy hh:nn]

This statement actually is showing me an error message "The expression you entered contains invalid sytax."

Help would be awesome! thanks!
Jeff
 
I was going to share a photo of what it now comes up as, but it won't let me. So here is what I did. I followed that link and used those parameters. It works now, but I need some fine tuning.

When I run it the first box asks for the following:

Between [Enter the Start Date:] and [Enter the End Date:]
I input 01/01/2017

Second box asks:
Between Enter the Start Date: and Enter the End Date:

This is kind of confusing for someone, isn't it?
I would like it to ask the person running the report:

First box:
Enter Start Date & Time mm/dd/yyyy hh:nn

Second Box:
Enter End Date & Time mm/dd/yyyy hh:nn

Those are the correct Data Type formats for my Date and Time field in their respective tables.

Thanks for your help!
 
I agree that asking specifically for both dates make it more clear. Have you considered using an input form with two unbound fields for the dates?
 
I could try that, that wouldn't be a problem. Could you help me out and explain how I can do that?

Thanks!
 
Sure. A simple input form for the two dates. For your query, you would use >= Forms!yourform![StartDate] And <= Forms!yourform![EndDate] in the design grid.
 
So on the report, within the Report Header or the Page Header? And create 2 text boxes?

What info goes in which unbound box?
Jeff
 

Users who are viewing this thread

Back
Top Bottom