J
JMF
I asked several days ago how to create a parameter query where the user is
offered a combo box, and received a number of great responses, including the
one attached below. Following those instructions, I successfully created a
form that creates a query from a combo box.
At that point, I became more ambitious and wanted to finish the job, adding
that last step mentioned by John Vinson:
That is, I decided to add a report at the end, based on my
combo-box-generated query.
However, this is what happened: when I launch that report, it tries to run
the query again, asking for the parameter input of that form's combo box. I
wanted the report to just run based on the already-finished query, not
running it again.
Clearly I've missed something conceptually here. Can somebody straighten me
out?
Thanks!
John
----- Original Message -----
From: "John Spencer" <[email protected]>
Newsgroups: microsoft.public.access.queries
Sent: Friday, April 28, 2006 5:53 PM
Subject: Re: New to queries: parameter query with dropdown box?
offered a combo box, and received a number of great responses, including the
one attached below. Following those instructions, I successfully created a
form that creates a query from a combo box.
At that point, I became more ambitious and wanted to finish the job, adding
that last step mentioned by John Vinson:
It's convenient to base a second Form or Report on the resulting query to
display the results; if you put a button on frmCriteria to launch that
form
or report, the user can enter the criterion and view the results in one
simple operation!
That is, I decided to add a report at the end, based on my
combo-box-generated query.
However, this is what happened: when I launch that report, it tries to run
the query again, asking for the parameter input of that form's combo box. I
wanted the report to just run based on the already-finished query, not
running it again.
Clearly I've missed something conceptually here. Can somebody straighten me
out?
Thanks!
John
----- Original Message -----
From: "John Spencer" <[email protected]>
Newsgroups: microsoft.public.access.queries
Sent: Friday, April 28, 2006 5:53 PM
Subject: Re: New to queries: parameter query with dropdown box?
Check out this article for a detailed discussion.
http://www.fontstuff.com/access/acctut08.htm
A brief quote from an John Vinson (Access MVP) posting.
You'll need to create a small unbound Form (let's call it frmCriteria)
with
a Combo Box control (cboCrit) on it. Use the combo box wizard to select
the
table for the selections, and be
sure that the bound field of the combo is the value you want to use as a
criterion. Save this form.
Now use
=[Forms]![frmCriteria]![cboCrit]
as the criterion in your Query.
It's convenient to base a second Form or Report on the resulting query to
display the results; if you put a button on frmCriteria to launch that
form
or report, the user can enter the criterion and view the results in one
simple operation!
Quoting John Vinson