View Full Version : Record Source problem


mahmudich
08-27-2003, 06:32 AM
Hi guys!

I’ve got bloody report.
One Control Box should display list of data. Unfortunately, the list can’t be obtained from the Report’s Record Source.
So, I created Query [qry1], and in a Control Source of the Control Box I write following expression:
=[qry1].[theList]

Where [theList] is a field that contains the list of necessary data.

And here it is:
When I try to open the Report it prompts me to Enter Parameter Value for [qry1], despite the fact that [qry1] works perfectly fine by itself.

I feel that the answer should be damn easy.

Thank you.

Rich
08-27-2003, 06:51 AM
Either use DLookUp, a Union query or a subreport, you haven't supplied enough detail for us to advise which

mahmudich
08-28-2003, 12:54 AM
Thank you Rich,

Ok, I’ll try to rephrase my question: If Record Source of a Report doesn’t contain data for a Text Box, then can the data be obtained from a Query (which is not part of the Report)?

Cheers

mahmudich
08-28-2003, 01:18 AM
I’ll try to make the question very simple:

In Expression Builder for the Text Box first I click on Queries, and then select Query and required field of that Query, so it looks like:
= [MyQuery]![RequiredFild]
That line goes to Control Source of the Text Box.

When I want to view the Report, it asks me to Enter Parameter Value for MyQuery.

Rich
08-28-2003, 01:22 AM
You can't refer to a query in that way if it's not part of the reports underlying record source, you can use DLookup on the query, although I wouldn't recommend it

mahmudich
08-28-2003, 01:29 AM
I tried to use Dlookup but what it does is select for me just one value where as I need the whole list of values of the field.

Thank you

Rich
08-28-2003, 01:35 AM
Is there a link between the query and your report?

mahmudich
08-28-2003, 01:38 AM
That's the problem: NO.

But theoretically, if Expression Builder allows me to choose a query and the field I want, then shouldn’t be a problem, should be?