Pulling value from another report

  • Thread starter Thread starter Thomas Troutwine
  • Start date Start date
T

Thomas Troutwine

I'm trying (unsuccessfully) to pull a calculated value from a field on
report 1 into a calculation for a field on report 2. I'm using Office 2000
in Win 2000. Any suggestions?
Thanks, Tom T
 
I wasn't very clear. Report2 source is a different query with different
fields. I need to use the value from Rpt1txtMPG (the result of Rpt1txtMiles
/ Rpt1txtGallons) and multiply Rpt2txtAmt by Rpt1txtMPG to show on Report2.
 
I wasn't very clear. Report2 source is a different query with different
fields. I need to use the value from Rpt1txtMPG (the result of Rpt1txtMiles
/ Rpt1txtGallons) and multiply Rpt2txtAmt by Rpt1txtMPG to show on Report2.

Reports don't contain data, they display data.
If the record source of the other report is a table or query, you can
us a DLookUp in your report to get a value from that table/query.
Then perform whatever calculations you want with it in your report.

=DLookUp("[FieldName]","TableName","[SomeControl] = " &
SomeCriteria)/DLookUp([DifferentFieldName]","TableName","SomeControl]
= " & SomeCriteria)

Because the Where clause portion of a DLookUp needs to be written
differently for different datatypes, I suggest you look up in VBA
help:
Restrict data to a subset of records.
 
Back
Top