Entry Field for Report Execution

  • Thread starter Thread starter Larry H.
  • Start date Start date
L

Larry H.

HI,
I have Access 2000 with a very large database containing
two DATE fields (short date format). I have designed a
REPORT to print out cetain criterion that was provided in
an initial QUERY.

I would like to PREVIEW the report, but prior to seeing
the results, ENTER a brand new SHORT DATE field
containing a date that will allow an ultimate selection
of ONLY the records within the queried report that are >
or = to the INPUT date at Report Time.

Can I do this ??? If so, would someone please steer me
in the right direction. I have set up these reports so
that the ultimate user of the data WILL NOT have to
understand Access to pull out speciic records based on a
possible earlier date than some that are already in the
database.

I would very much appreciate some help.

Thanks,
larry H.
 
Larry,

If your report's data comes from a query, like you say, it's quite easy.
Actually, you can do it simply in two ways:
1. In your query design, add a criterion on the date field that requests for
user entry via an input box. The criterion should be something like"
= [Date From?]
Upon execution of the report, the query will be executed in the background,
and the user will be presented with an inputbox with the prompt "Date From?'
(the text in square brackets). The user types in the date and clicks OK, and
the query uses the user's input in the >= criterion.
2. Make a simple unbound form with a text box (even better, a Date Time
Picker actice X control). Assuming the form is called Form1 and the control
(tecxt box or active X) Ctrl1, go to the query design and use the following
criterion instead:
= Forms!Form1!Ctrl1
Now, as long as the form is open and the user has typed in (or selected) a
date in the control, the report can be run and the query will pick up that
date in the criterion. Taking this a step further, you can add a command
button on the same form to execute the report. Of course, you can do the
same on an already existing form (or a switchboard) if you like.

HTH,
Nikos
 
Back
Top