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

Run query from Report

P: 31
I am trying to run a query from a report. I have gotten some help here before on setting up a query. This is what i am trying to run...
Expand|Select|Wrap|Line Numbers
  1. SELECT tblHL.[Heat Number]
  2. FROM tblHL, Table1
  3. WHERE (([hl]=[table1].[hl1]));
In a reported field. Access tells me that anything in the field needs to start with "=", but I tried that too. I do know that i am putting the sql statement in the wrong place. On a form it would go in the record control source..... where does it go on a report.

I will have to repeat whatever works many times for the report (with different fields obviously). Any help would be greatly appreciated.
Jan 5 '09 #1
Share this Question
Share on Google+
3 Replies

Expert Mod 15k+
P: 31,418
Queries referenced in a report should all be included as the RecordSource of the report itself. A repository from where all displayed data can be extracted.

Does that help?
Jan 5 '09 #2

P: 31
Maybe. I dont have very much experience with this. How many queries can i run in the recordsource, and how will i direct them to the proper field on the report. Maybe i dont understand completey. Will i be able to pull from more than 1 table... the recordsource only seems to allow 1 table.
Jan 7 '09 #3

Expert Mod 15k+
P: 31,418
That doesn't sound like what I was trying to say.

What I meant was to ensure that the query that the report runs off has all the data that will be required within the report. There is no need to run extra queries while the report is running. Indeed that doesn't really make much sense.
Jan 7 '09 #4

Post your reply

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