A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Use SQL Statement In Report Text Box



 
 
Thread Tools Display Modes
  #1  
Old August 30th, 2011, 11:35 PM
Jeff Monroe Jeff Monroe is offline
Member
 
First recorded activity by OfficeFrustration: May 2006
Location: San Diego, CA
Posts: 27
Default 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
__________________
jm

Last edited by Jeff Monroe : August 30th, 2011 at 11:47 PM. Reason: Add Notifocation
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.