Querie Parameter

O

Omar

Again, thanks very much for your suggestions and comments,
you all have been extremely instrumental in my ability to
understand access.

I have a parameter querie setup using the "Between [start
date] and [end date] syntax. I have a print menu that I
use to print the report from this querie. When I try to
print, the "start" and "end" date boxes pop up. What I
would like to do is be able to type in these dates in my
form and have access use these dates to run the querie
instead of prompting the user for this information. Thanks

OMAR
 
J

Jean

Instead of the parameter query in the criteria row, you
need to refer to the controls on the form (which must be
open). For example:

Between [Forms]![dlgGetdates]![EarliestDate] And [Forms]!
[dlgGetdates]![LatestDate]

where dlgGetDates is the form and EarliestDate and
LatestDate are the controls that you user fills in. A
button on the same form that opens the report, which is
based on the query that gets its criteria from the form
will complete the picture.

HTH
 
V

Van T. Dinh

A small correction:

[Forms]![dlgGetdates]![EarliestDate] and
[Forms]![dlgGetdates]![LatestDate]

ARE Parameters (to the Queries) here. In this case, the Expression Service
resolves the Parameters (which are the references to the Form Controls) to
the values in these Control before passing the Query to JET for processing.

.... and make sure the Parameters are declared as DateTime in the Query. See
the thread "How Can I get Stored Query to Read Parameter from Open Form"
in the newsgroup "microsoft.public.access.queries" started by "Gcook888"
<[email protected]> on 15 October 2003 07:42 (my date/time GMT + 10:00).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Parameter Queries 1
Parameter Querie 2
Print screen input for parameter querie 1
Udayan-Queries 1
Page sort 0
Creating a Search using a combo box and then creating a report. 4
Parameter Queries 1
Printing reports 1

Top