Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sums on reports as DLookup

Status
Not open for further replies.

1510982

Programmer
Joined
Feb 17, 2002
Messages
57
Location
SI
Hello,

one question. Is it possible to run DLookup for each record in reports.
I have only a table with names of a companies (company.value) and now I want to SUM all traffic with them in another table and store them in payed.value textbox for each company. The expression for one company should go like this:

traffic.Value = DSum("[payed]", "payments", "[payed] = TRUE AND [company] = '" & company.Value & "'")

The output would be

--------------------------
Coca-cola 500.000 $
Microsoft 200.000 $
...
--------------------------

Get the idea? Thanks for the answers!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top