OfficeFrustration

OfficeFrustration (http://www.officefrustration.com/index.php)
-   Setting Up & Running Reports (http://www.officefrustration.com/forumdisplay.php?f=26)
-   -   Use SQL Statement In Report Text Box (http://www.officefrustration.com/showthread.php?t=1126274)

Jeff Monroe August 30th, 2011 11:35 PM

Use SQL Statement In Report Text Box
 
In Access 2007 I have a report where I would like to use a SQL statement inside a text box's control source. In the text boxes control source I copied the SQL statement from a query:

SELECT Count([tblBasic Info].Complaint) AS CountOfComplaint
FROM [tblBasic Info]
WHERE ((([tblBasic Info].[Complaint State])="Registered")) OR ((([tblBasic Info].[Complaint State])="Investigation"));

When I run the report I get the Name? error.

Is it possible to to this?

I am trying to avoid writing several queries that each have one data point (a summary of data) and placing them in the report as several sub-reports.

Thanks.
Jeff


All times are GMT +1. The time now is 08:07 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
OfficeFrustration.com