I have a simple one page report based on a select query with one criteria based on one table; it results with "#Error".
I have reproduced the same problem in the following simple example:
Table1 with record ID and city names:
1 Chicago
2 Chicago
3 Lyons
Table1Query:
Selects records using hardcoded criteria "chicago"
Table1Report:
counts the records in the Table1Query domain using
DCount("[ID]","Table1Query"
THIS WORKS, producing a reported count of 2
THE PROBLEM OCCURS when...
In order to make the production of the report simpler I change the critera in the query to an input parameter, ie., [Enter City Name]. Responging to the input parameter with "chicago", the stand-alone query produces the same record count, "2", as when it was hardcoded, but now the report only returns "#Error" where DCount(....) was used.
I have read in other Access TekTips where field names cannot be the same as the underlying source table/query field name. The name of the field in the report is Text5. Of course, the name of the field is ID in both the Table and the Query.
Any thoughts?
I have reproduced the same problem in the following simple example:
Table1 with record ID and city names:
1 Chicago
2 Chicago
3 Lyons
Table1Query:
Selects records using hardcoded criteria "chicago"
Table1Report:
counts the records in the Table1Query domain using
DCount("[ID]","Table1Query"
THIS WORKS, producing a reported count of 2
THE PROBLEM OCCURS when...
In order to make the production of the report simpler I change the critera in the query to an input parameter, ie., [Enter City Name]. Responging to the input parameter with "chicago", the stand-alone query produces the same record count, "2", as when it was hardcoded, but now the report only returns "#Error" where DCount(....) was used.
I have read in other Access TekTips where field names cannot be the same as the underlying source table/query field name. The name of the field in the report is Text5. Of course, the name of the field is ID in both the Table and the Query.
Any thoughts?