Why does my parameter query repeat?

  • Thread starter Thread starter gsmith4000
  • Start date Start date
G

gsmith4000

Hello--

Why would a parameter query repeat the same parameters
twice? Two different queries are having this same problem.
It'll prompt the user for Tracking Number, then Employee.
After the user types in the values, it then prompts them
all over again. Aggravating? You bet!

The only way I've found to "fix" this problem is to delete
the offending query and start over.

There must be a better way... Thanks as always.

--Gary
 
This behavior will happen sometimes when you use a parameter query in a
report - many reports pass through the data more than once and, therefore,
run the query more than once.

It should not happen in a query where you explicitly declare the parameters.
Choose Parameters from the Query menu or include a PARAMETERS clause at the
beginning of the SQL. It's a good idea to always declare parameters. In
some cases (e.g. a Crosstab query), the query won't run unless you declare
the parameters.

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
 
John--

The query is not part of a form of report, I just have it
come up as is... So I tried your suggestion about
declaring the parameters, and guess what? Now, it asks for
each parameter FOUR times! Yikes!

--Gary
 
Well, if you slightly misspell the parameter, you'll get prompted once for
the Parameter declaration and then again from the query body. Something is
amiss - please post the SQL from your query.

--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
 
John--

You were right -- I did misspell the parameter (actually I
typed in the field names themselves). I fixed that, and --
voila -- it works! Thanks again!

--Gary
 
Back
Top