94Sport5sp
Registered User.
- Local time
- Today, 06:35
- Joined
- May 23, 2012
- Messages
- 115
Hi:
I have a form with a command button and some VBA code. After checking that the user has done all that needs to be done then they can click on the command button to print a report. I am having a problem with the report.
The error message I get says I have "Written a subquery that can return more than one field without using the EXISTS reserved word in the Main Query's From clause" and I do not understand the problem so I cannot fix it.
When clicked the button builds a query string which contains "Select * From SalesTbl Where (SalsTbl.Process=True); and then runs a DoCmd.OpenReport, stDocName, acNormal, , strCriteria.
In the above stDocName is the name of an existing report and strCriteria is the above Select statement.
What is Access trying to tell me. Why do I need an EXISTS predicate and where does it go?
Reading in the help and online gives me several examples of using EXISTS to get records from two different tables but I only have one table in play. The report contains fields from the SalesTBL and when I run the above query (as a standalone query) it returns the records I want.
Thanks
I have a form with a command button and some VBA code. After checking that the user has done all that needs to be done then they can click on the command button to print a report. I am having a problem with the report.
The error message I get says I have "Written a subquery that can return more than one field without using the EXISTS reserved word in the Main Query's From clause" and I do not understand the problem so I cannot fix it.
When clicked the button builds a query string which contains "Select * From SalesTbl Where (SalsTbl.Process=True); and then runs a DoCmd.OpenReport, stDocName, acNormal, , strCriteria.
In the above stDocName is the name of an existing report and strCriteria is the above Select statement.
What is Access trying to tell me. Why do I need an EXISTS predicate and where does it go?
Reading in the help and online gives me several examples of using EXISTS to get records from two different tables but I only have one table in play. The report contains fields from the SalesTBL and when I run the above query (as a standalone query) it returns the records I want.
Thanks