DLookup in Report

Thecherub

Man with a Mission
Local time
Today, 01:42
Joined
Jan 14, 2004
Messages
92
this is a bit of a mess please bear with me

I have a report that uses values from a Query so far so good.

now I have values in a second query (History) and I sumed a Count in that query in a Third query (Historysum). Now I set an unbound field in my report to "[Historysum]![SumOfCountOfTime Off Booked]" now i get a enter Parameter value box insted of my query results?

Does anyone know how io can avoid this. In tried puting the Historysum in the main query but that just messed up the main querys data.

I'm quite stumped.
 
dlookup?

I've already got 2 subreports. and i'm trying to avoid a third. Especialy since the value that i insert into the main has to be used for a calculation.

"=DLookUp([total],[Historysum])"

Is this right for the DlookUp code? I renamed the Count field to "total" for ease of checking. acording to help this is right but i'm getting a Parameter value box named looking for the value of total.
 
Yes!!!

Rich said:
I think it's =DLookUp("total","Historysum")


Thank you, thank you, thank you. :D :D :D

It works.

Damn didn't look far enuf. The code works but only for the first value. In other words the first value for Historysum!total is 2. It fills that through the whole report rather than sorting it as it should.

How can i get the DlookUp to sort in the report.

The Historysum query has the, Department, Lastname. Firstname and, total fields.
 
Last edited:
Please Disregard

Please disregard my last post.

I got everything working. I had to use subreports and querys out the yin-yang but everything works and works well.

I hope they don't want any more changes.
 

Users who are viewing this thread

Back
Top Bottom