By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,683 Members | 1,093 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,683 IT Pros & Developers. It's quick & easy.

Adding the results of a calculation query into a report

P: 1

I'm in the process of producing a database for a college project and have a slight problem I was wondering whether you could help me with.

The area I'm having problems with takes a value from a drop-down menu on a form and inputs it into a query to find a selection of results which another query then adds up to give a total which I would like to insert into a report.

The actual query part appears to be working since if you select an item from the drop-down and then run the second query, you get the sum of all the records associated with the number selected on the drop-down displayed in the query datasheet view as normal.

The problem occurs when I try and put this into a report - I get a #NAME? error in the textbox. The control source I'm using in the report is " =[expr1]![additionquery2] " am I missing something obvious? Looking at past posts this looks like a query name is spelt wrong but all are correct.

Any ideas on this would be appreciated or if there is better way to do the same thing I'd also be very grateful.

Sorry for the long post



(using MS Access 2003)
Mar 3 '07 #1
Share this Question
Share on Google+
1 Reply

Expert Mod 15k+
P: 31,770
What is the Record Source of the report and is it related to the query you're referring to ([additionquery2] I think)?
BTW Your report's TextBox cannot reference an item from a foreign query, and if it could, it would certainly start with the query name and then qualify that with the field reference, rather than the other way around.
Can you post the names of the items you're trying to use and the SQL for the query please.
Mar 4 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.