Expression Builder

G

Guest

In my database i have two tables, a seperate query built from each table, and
a single report. In the report I am trying to build an expression that adds
a value from quesy 1 to another value from query 2. Access will not let me
do this. I need to make this calculation but i continually get error
messages. Help please. Thanks
 
R

Rick B

What is the data source of your report? Are you pulling both queries into
your SQL behind the report? That would be the only way that I would know to
use data from both queries. I'm assuming there is some common field in
these two queries so you can build a proper relationship?


Rick B
 
F

fredg

In my database i have two tables, a seperate query built from each table, and
a single report. In the report I am trying to build an expression that adds
a value from quesy 1 to another value from query 2. Access will not let me
do this. I need to make this calculation but i continually get error
messages. Help please. Thanks

Why not make a 3rd query, using the 2 you already have, and add a
column in the query doing the calculation? Use this query as the
report record source.
If for some reason you cannot, then you can use DLookUp:
=DLookUp("[FieldA]","QueryA") + DLookUp("[FieldB]","QueryB")
You may need to add criteria to each of the above expressions, so that
Access knows which record to address.
 

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