You have a Totals query as the source for your report.
This query includes criteria that reads from a text box, such as:
[Forms].[Form1].[Text0]
So you open the form, type in the value, and then run the report.
But the report pops up a parameter dialog asking for values?
Lots of things could be happening here, so let's take it one step at a time.
1. If you open the query itself, does it pop up the parameter box?
- No: Go to step 2.
- Yes: You may have misspelled a field name, or used a reserved word, or you
may trying to refer to a field that is not in the final output (e.g. one
that was in the WHERE clause but not the GROUP BY field.) Post the SQL
statement for your query if you get stuck here.
2. If the query works correctly, let's go go the report. Write down the
names Access doesn't understand. (These are the ones it pops up the
parameter box for.) Are these actually in the query results? That is, when
you view the data for your query, do you see a column with this name?
- No: The report cannot display data that is not in its source query.
Either add the field to the query, or remove it from the report.
- Yes: Add a text box to your report for these fields.
You can set their Visible property to No if you wish, but if they are not on
the report, Access tries to be too smart and doesn't always bother to fetch
them.
There are some less obvious places to look if you want to remove these from
your report. That includes the Sorting And Grouping dialog (View menu), the
Filter and Order By properties of the report, and the Control Source of
controls (even those that use expressions.)
Also, the form must remain open: it won't work if you close the form while
the report is still open.
3. If the form has problems anyway (showing #name), this could cause the
query and report to jam up too since they rely on the form for their
criteria. The #name could be many things. Typically a control is bound to a
non-existent field, or to an expression that refers to somehing
non-existent, or it has a name that is the same as a field but is bound to
something different.