Filter on Report

Kira

Registered User.
Local time
Today, 15:06
Joined
Jul 7, 2008
Messages
40
I have a report that displays Item, Transaction, Quantity, and Created date. i need to have it so that when I open this report it asks for the date specifications. A beginning date and an ending date. How do i get it to do this?
 
if your report is based on a query you can put parameter in the criteria row of your query.

Alternatively, a little bit more elaborate is to use unbound textboxes on a form to enter the dates there, and use those values as parameters for your report filtering.
 
alright so have open the "Query Parameters" box, but what do I need to put in to get it to do what I want?
 
no don't open the query parameters, but in your date field in your query, put:

Between [Enter Start Date] And [Enter End Date]
 
is there a specific format that i need to have it in? The field currently just has"created date" in it. It keeps saying invalid syntax.
 
right after the words "created date". created dateBetween [Enter Start Date] And [Enter End Date] I am not too savvy with codes. I don't really know their principles.
 
you should put that code in the criteria row of your query ... read on the left hand side in the lower pane of your query when in design view and paste Between [Enter Start Date] And [Enter End Date] in your date field
 
thank you. It works perfectly now. :) But now it says I am "missing operator" in the created date field. know what that's about?
 
well i am not sure about that but make sure that in the criteria row you have only:

Between [Enter Start Date] And [Enter End Date]

and make sure that the field name is correct since at first you put the above code next to the field name, therefore make sure that you have the correct fieldname at the top (and nothing else).
 
that worked, but I forgot that there are several reports linked to this query. Is there a way to get it to only do it for one query?
 
Do you mean for just one Report? I would just have a seperate Query for the reports you want to filter and a template Query for all of your other Reports that you do NOT want the filter.
 
Use the Where clause of the OpenReport method and you'll only need one query here
 

Users who are viewing this thread

Back
Top Bottom