Refering to a query that the report is not based on

G

Guest

Hello,

I have a report which is based on a query - CustomerCreditStatement. It
basically lists all the transactions a specified customer has within a given
time range.

In the report header, I want the incoming balance to be stated, so I made a
different query - IncomingBalance, summing op how much the client owed my
company prior to the period that is covered in the report.

I thought I would make a text field in the report header, and use the
expression builder to refer to the IncomingBalance query, but, even though I
managed to make the expression, I'm not getting the result of my query in the
header (I get an error message). I tried pasting the SQL statement for the
IncomingBalance into the Control Soirce of the text field, but that didn't
work either.

Can anyone give me a hint on what I need ot do here? I just want the sum of
all transactions (priort to the start of the period that the report covers)
to be shown in the report header.

thx in advance

Baard
 
M

Marshall Barton

bvdahl said:
I have a report which is based on a query - CustomerCreditStatement. It
basically lists all the transactions a specified customer has within a given
time range.

In the report header, I want the incoming balance to be stated, so I made a
different query - IncomingBalance, summing op how much the client owed my
company prior to the period that is covered in the report.

I thought I would make a text field in the report header, and use the
expression builder to refer to the IncomingBalance query, but, even though I
managed to make the expression, I'm not getting the result of my query in the
header (I get an error message). I tried pasting the SQL statement for the
IncomingBalance into the Control Soirce of the text field, but that didn't
work either.

Can anyone give me a hint on what I need ot do here? I just want the sum of
all transactions (priort to the start of the period that the report covers)
to be shown in the report header.


Use the DLookup function in the text box's expression to
retrieve the value from the query:

=DLookup("[Incoming Balance]", "table name")
 

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