D
David G
I am no expert on Access but have spent some time on this
issue recently. I can't be sure of what your reports or
queries contain, but here are some things to look for.
First of all, the "Enter Parameter Value" box offers a
clue. Note the "prompt," that line of text just above the
box where it seems to want you to type something. You will
be looking for that text at certain, specific locations in
your query or report.
Let's take queries first. Get the "QBE pane" showing.
That's the one that shows the columns in "Design View."
Look at the criteria line for each field. Do you see the
prompt on one of those? If so, then something about the
criteria information may be causing Access to treat your
query as a "Parameter Query" instead of the
typical "Selection Query" or whatever other type of action
query you are writing. Look in the help files or your
favorite full-featured Access book for more information
about how the criteria change a Selection Query into a
Parameter Query.
As to reports, I have run into this problem when I try to
create computed fields in a text box. The minute I type an
expression into a field's text box, or use the Expression
Builder to create one, then I get the parameter dialog box
when I try to preview the report. The only solution I've
found is to create the expression in a query then use the
query field.
Here's an example of what I mean. Let's say I want to
display the contents of a Yes/No field on a report for
ancient hippies from the 60's. I want the report to say
either "Cool" or "Gross". Let's say that the field is
named [Hippies Approve] and it's in [MyTable].
Here's an expression to do the job: =IIf([MyTable]!
[Hippies Approve],"Cool","Gross").
Put that expression into a text box on a report and the
Enter Parameter box appears when you try to preview. The
prompt will probably be the table name by itself, such
as "MyTable".
To fix it, first make sure that your report is getting its
information from a query instead of a table. Then add a
calculated field to the query. Just click in a blank Field
box at the top of a blank column and type in that same
expression. When you hit the Enter key Access will change
things slightly. The Field box now contains something like
this:
Expr1: IIf(([MyTable]![Hippies Approve],"Cool","Gross")
Change the name of this field to what you want its label
to be on the report. Something like, Man, like...
Hippies Say: IIf([MyTable]![Hippies
Approve],"Cool","Gross")
View the query Datasheet and notice that there is now a
column titled "Hippies Say" and populated with "Gross"
or "Cool" as appropriate to the actual value of the YesNo
field.
When you build your report based upon this query, there
will be a field named "Hippies Say" and the output of your
expression will be there for you.
And the parameter dialog box will go away.
At least it works for me. Good luck!
issue recently. I can't be sure of what your reports or
queries contain, but here are some things to look for.
First of all, the "Enter Parameter Value" box offers a
clue. Note the "prompt," that line of text just above the
box where it seems to want you to type something. You will
be looking for that text at certain, specific locations in
your query or report.
Let's take queries first. Get the "QBE pane" showing.
That's the one that shows the columns in "Design View."
Look at the criteria line for each field. Do you see the
prompt on one of those? If so, then something about the
criteria information may be causing Access to treat your
query as a "Parameter Query" instead of the
typical "Selection Query" or whatever other type of action
query you are writing. Look in the help files or your
favorite full-featured Access book for more information
about how the criteria change a Selection Query into a
Parameter Query.
As to reports, I have run into this problem when I try to
create computed fields in a text box. The minute I type an
expression into a field's text box, or use the Expression
Builder to create one, then I get the parameter dialog box
when I try to preview the report. The only solution I've
found is to create the expression in a query then use the
query field.
Here's an example of what I mean. Let's say I want to
display the contents of a Yes/No field on a report for
ancient hippies from the 60's. I want the report to say
either "Cool" or "Gross". Let's say that the field is
named [Hippies Approve] and it's in [MyTable].
Here's an expression to do the job: =IIf([MyTable]!
[Hippies Approve],"Cool","Gross").
Put that expression into a text box on a report and the
Enter Parameter box appears when you try to preview. The
prompt will probably be the table name by itself, such
as "MyTable".
To fix it, first make sure that your report is getting its
information from a query instead of a table. Then add a
calculated field to the query. Just click in a blank Field
box at the top of a blank column and type in that same
expression. When you hit the Enter key Access will change
things slightly. The Field box now contains something like
this:
Expr1: IIf(([MyTable]![Hippies Approve],"Cool","Gross")
Change the name of this field to what you want its label
to be on the report. Something like, Man, like...
Hippies Say: IIf([MyTable]![Hippies
Approve],"Cool","Gross")
View the query Datasheet and notice that there is now a
column titled "Hippies Say" and populated with "Gross"
or "Cool" as appropriate to the actual value of the YesNo
field.
When you build your report based upon this query, there
will be a field named "Hippies Say" and the output of your
expression will be there for you.
And the parameter dialog box will go away.
At least it works for me. Good luck!