Showing Data from a different Query

S

SokkiHong

Hello, I am currently driving a report off of a query
called, "Issues Master Query." Within that report I have
one text box that is driving off of a "Issues SubTable".
However when I insert the expression "=[Issues_SubTable
Query]!Expr3" it gives me an error. Do any of you have
any idea how I can get this to work? Thank you.
 
F

fredg

SokkiHong said:
Hello, I am currently driving a report off of a query
called, "Issues Master Query." Within that report I have
one text box that is driving off of a "Issues SubTable".
However when I insert the expression "=[Issues_SubTable
Query]!Expr3" it gives me an error. Do any of you have
any idea how I can get this to work? Thank you.

Try using DLookUp.

If there is just the one record returned in that other query, then, as
control source of an unbound control on the report:

= DLookUp("[Exp3]","[Issues_SubTable Query]")

If there are many records returned in this query, then you'll need to
add a Where clause to the DLookUp.
See Access Help on
DLookUp and
Where clause + Restrict data to a subset of records
 
S

SokkiHong

Thank you for your advice. However I believe I am having
little problem with syntax, could you please give me an
example of

DLookUp and
Where clause + Restrict data to a subset of records ?

Thank you so much.

-----Original Message-----
SokkiHong said:
Hello, I am currently driving a report off of a query
called, "Issues Master Query." Within that report I have
one text box that is driving off of a "Issues SubTable".
However when I insert the expression "=[Issues_SubTable
Query]!Expr3" it gives me an error. Do any of you have
any idea how I can get this to work? Thank you.

Try using DLookUp.

If there is just the one record returned in that other query, then, as
control source of an unbound control on the report:

= DLookUp("[Exp3]","[Issues_SubTable Query]")

If there are many records returned in this query, then you'll need to
add a Where clause to the DLookUp.
See Access Help on
DLookUp and
Where clause + Restrict data to a subset of records
--
Fred
Please reply only to this newsgroup.
I do not respond to personal e-mail.
.
 
F

fredg

SokkiHong said:
Thank you for your advice. However I believe I am having
little problem with syntax, could you please give me an
example of

DLookUp and
Where clause + Restrict data to a subset of records ?

Thank you so much.

-----Original Message-----
SokkiHong said:
Hello, I am currently driving a report off of a query
called, "Issues Master Query." Within that report I have
one text box that is driving off of a "Issues SubTable".
However when I insert the expression "=[Issues_SubTable
Query]!Expr3" it gives me an error. Do any of you have
any idea how I can get this to work? Thank you.

Try using DLookUp.

If there is just the one record returned in that other query, then, as
control source of an unbound control on the report:

= DLookUp("[Exp3]","[Issues_SubTable Query]")

If there are many records returned in this query, then you'll need to
add a Where clause to the DLookUp.
See Access Help on
DLookUp and
Where clause + Restrict data to a subset of records
--
Fred
Please reply only to this newsgroup.
I do not respond to personal e-mail.
.

= DLookUp("[Exp3]","[Issues_SubTable Query]","[RecordID] = " &
[RecordID])

If there are many records returned in the query, it will find the [Exp3]
record that matches the [RecordID] currently shown in the report section
this control is placed in.
The above assumes that [RecordID] is a unique prime key field of Number
datatype.
See Access help for how to write the Where clause using other datatypes.
 

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