Parameter Queries

  • Thread starter Thread starter tinab
  • Start date Start date
T

tinab

I have been trying to figure out how to have my parameter query get
the criteria from a form I have created. I enter the criteria using
the Forms!FormName!FormControl and I always get the default access
form "Enter Parameter" with the name of my form on it. I have read
everything possible in the groups, I even went through steps in the
http://support.microsoft.com/kb/q209645 sample using Northwind and it
did not work either. This is so frustrating! I read a posting asking
how to do this and the following is the answer to the posting. I have
read many responses with these instructions and it does not work! I
have been dealing with this issue for the last week and I am so
frustrated!

Answer to the posting:
You can't do this with the standard parameter form that pops up in a
parameter query. You will have to create your own form (one that looks
like
the parameter query box) and add your input mask to the text box. You
then
reference it in the query's criteria as follows:

=Forms!YourParameterForm!YourTextBox
 
tinab said:
I have been trying to figure out how to have my parameter query get
the criteria from a form I have created. I enter the criteria using
the Forms!FormName!FormControl and I always get the default access
form "Enter Parameter" with the name of my form on it. I have read
everything possible in the groups, I even went through steps in the
http://support.microsoft.com/kb/q209645 sample using Northwind and it
did not work either. This is so frustrating! I read a posting asking
how to do this and the following is the answer to the posting. I have
read many responses with these instructions and it does not work! I
have been dealing with this issue for the last week and I am so
frustrated!

Answer to the posting:
You can't do this with the standard parameter form that pops up in a
parameter query. You will have to create your own form (one that looks
like
the parameter query box) and add your input mask to the text box. You
then
reference it in the query's criteria as follows:

=Forms!YourParameterForm!YourTextBox

Is the form already open *before* you attempt to run the query?
 
I have been trying to figure out how to have my parameter query get
the criteria from a form I have created. I enter the criteria using
the Forms!FormName!FormControl and I always get the default access
form "Enter Parameter" with the name of my form on it. I have read
everything possible in the groups, I even went through steps in the
http://support.microsoft.com/kb/q209645 sample using Northwind and it
did not work either. This is so frustrating! I read a posting asking
how to do this and the following is the answer to the posting. I have
read many responses with these instructions and it does not work! I
have been dealing with this issue for the last week and I am so
frustrated!

I suspect you're doing things in the reverse order: running the query
and expecting it to open the form. It won't!

If the form is not open, you will in fact get the prompt. That's not
what you want - open the form FIRST.

Instead, base a Form (for onscreen viewing) or Report (for printing)
on the saved Query. Save this form or report. Put a command buttono on
the criteria form to open the data display form (or the report, or
both). Select the value in the form control; click the command button;
and you'll see the selected data displayed on the form. There is no
need to go to the Query window at all.


John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
The problem is that you keep trying to do something that is not possible.
Give up
the idea that you will be running a parameter query. You won't. You will be
opening
a form of your own design that you CAN make resemble the form that opens
when a parameter query is run.
When that form opens you will be entering values into it that will be used
as criteria in a SELECT
QUERY that refers to the field or fields in your form. Please let us know
which parts of the creation process
you are having trouble with. Have you created the input form? Have you
created the query? Do you realize
that putting brackets [] around Forms!FormName!FormControl in the criteria
row is a mistake? Try removing them.

Hope the above helps.

Ed G
 
The problem is that you keep trying to do something that is not possible.
Give up
the idea that you will be running a parameter query. You won't. You will be
opening
a form of your own design that you can make RESEMBLE the form that opens
when a parameter query is run.
When that form opens you will be entering values into it that will be used
as criteria in a SELECT
QUERY that refers to the field or fields in your form. Please let us know
which parts of the creation process
you are having trouble with. Have you created the input form? Have you
created the query? Do you realize
that putting brackets [] around Forms!FormName!FormControl in the criteria
row is a mistake? Try removing them.

Hope the above helps.

Ed G
 
Back
Top