Parameter Passing

M

Mac

Dear All,

I have to pass a variable to a report that is not entered by the user,
it's a two part variable, basically a between a and b where a is a
subquery and b is a user entered date. I can get the relevant text box
on my form to pick up the user entered variable, but the moment I try
to get it to pick up the subquery variable I get the name? error. The
text box should ideally end up looking like "Period : 01/01/06 to
30/06/06", where the 01/01/06 comes from the subquery and the 30/06/06
from the user. I've tried using a front end form to no avail, so any
suggestions gratefully recieved. TIA.

Mac
 
L

Larry Linson

What do you mean by "pick up the subquery?" Subqueries only exist in SQL
statements, so you couldn't "pick one up," AFAIK. Help us with some
information and maybe someone can assist.

If you are using code, post it; if you are trying to use a Query in the
ControlSource, that will not work, but a Domain Aggregate Function, such as
DLookup might work for you in the ControlSource.

Larry Linson
Microsoft Access MVP
 
M

Mac

Dear Larry,

What I mean by pickup the subquery, is that the result of the subquery
(in my example above 01/06/06) be carried into the end result of the
text box, not the subquery itself. I was just wondering if that can be
done?

Regards

Mac
 
L

Larry Linson

I am confused by what you mean by "subquery." The definition of "subquery"
with which I am familiar is an SQL statement that is embedded in another SQL
statement. Perhaps it is just a matter of terminology, but I don't see how
that fits with your use of the term.

And, "_the_ subquery" is even more confusing, because most Access objects do
not use a Query containing a Subquery (or the corresponding SQL).

Ross Perot, when running for President, said, "The Devil's in the details."
That applies to questions about databases, too.

Larry Linson
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top