[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 541
  • Last Modified:

MS Access Report SQL Query result in Text Box

Hi,

I'm new to MS access Reports so please bear with me.

I have a text box where I'm trying to set the data source using a SQL Query:

SELECT SUM(AMT)
FROM dbo_INTable
WHERE CODE='S';

Open in new window


and when I view the report, all I get is "#NAME?" in the text box.  I've also tried creating the SQL statement as an Access query (the query works) and using that as the control source but I still get the same result.  Any idea what I'm doing wrong?
0
stmoline
Asked:
stmoline
1 Solution
 
VTKeganCommented:
There are two keys things you need to do here.  Assuming your query works correctly.

When you create a new report you want to set the recordsource of the report to your query.

Then place a text box on the report detail section, and set the control source of the text box to be the field from your query.
0
 
stmolineAuthor Commented:
Okay, that pointed me in the right direction.  I think I got it now.  Thank you for your assistance.
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now