Dlookup to for each record

shwin

Registered User.
Local time
Today, 14:46
Joined
Jun 15, 2004
Messages
20
Hey Guys,

I have a problem here which should be simple but I am stuck and cannot find help on the previous posts on the forum. I have a report which I want to pull some information from a query. The query works fine but the report is giving me an error when I try to do the following Dlookup function. The report field has the following in its control source:

=DLookUp("ApproxValue5yr","ApproxValue","FundName=Forms!ApproxValue!FundName")

ApproxValue5yr is the field name in the query, ApproxValue is the query name

Additionally, if I leave out the "FundName=Forms!ApproxValue!FundName", it gives me the sum total of all the ApproxValue5yr fields. This should be pretty easy but I am not getting it. Any help would be grateful!

THanks!
 
shwin,

=DLookUp("ApproxValue5yr","ApproxValue","FundName = '" & Forms!ApproxValue!FundName & "'")

Wayne
 
Still not working

Thanks for your help guys.

Unfortunately, I am still getting #Name? in the field box when I try to do the Dlookup. Pat, this database will have only a few records so I think Dlookup may be appropriate. I have no idea what to do now so any help would be great. Again, my query is working fine and gives a correct value for each record however I am unable to show this in my reports. The report is instead just giving the sum of the total number.

Thanks!
 

Users who are viewing this thread

Back
Top Bottom