query parameter order

A

AccessMan

I am requiring the user to enter three parameters for a query and I'd like to
control the order in which they are prompted for. Two of the parameters are
called for using square brackets (with prompt text enclosed) on the Criteria:
line, and the third is called for similarly but on the Field: line. As it
stands now the user is prompted for the third criteria first, but I'd like
for it to be last.

Is there a way to control the order in which the dialog boxes for the
parameters appear? Thanks!
 
K

KARL DEWEY

Yes. Copy the exact same as in criteria to the field line. Arange the field
line order to control order of prompt. You can turn of the display if you
wish.
 
J

John Spencer

Yes, there is a way. (At least I believe there is a way)

Declare your parameters in the order you want them to appear.

Open the query in design mode
Select Query: Parameters from the Menu
Fill in the EXACT name of the parameter in column 1
Select the data type of the parameter in column 2
Repeat for the other parameters.
The order of declaration should be the order of display.

John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 
A

AccessMan

I neglected some details that are apparently important. This is an append
query that is used to copy a set of records from a table into a new set of
records for the same table. The table has two key fields. The new set of
records has the value in one of the key fields changed. The user is prompted
for the two existing key values (x and y) to isolate the desired records, and
is then prompted for a third parameter that represents the new key field
(yprime) for the new records to be appended. So x, yprime, and the nonkey
fields are to be appended to the table specified in the query. With the
bracketed parameter text on the Field: line, I am only prompted for values
for x and yprime for some reason.

If I move the bracketed parameter text for y from the Field: line to the
Criteria: line, I do get prompted for this value but not in the order that I
want. Left to right, the fields appear in this order: x, y, yprime. The
order of prompting is x, yprime, then y! My simple need is for this order to
be x, y, then yprime.

Thanks!
 
J

John Spencer

Did you try my suggestion? I did and it worked for me on a simple select
query. Perhaps it won't work on an action query (append, delete, update).

Perhaps you can post the SQL of your query (Hint: in design view, select View:
SQL from the menu) and copy and paste the SQL statement.



John Spencer
Access MVP 2002-2005, 2007-2008
Center for Health Program Development and Management
University of Maryland Baltimore County
 

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

Top