kousotsu
Eeny, meeny, miney...Jim?
- Local time
- Today, 01:49
- Joined
- Apr 2, 2004
- Messages
- 23
I'm probably just missing something simple, but I'm having a problem using DLookUp.
I have a report which is bound to a particular query returning counted values by three criteria: Vendor, Area, and Month. From a seperate query (or pair of, depending on which way is quicker for the system), I need to extract a pair of summed Mileages (one total, one YTD), once for each Vendor, once for each Area, and a Total overall.
Here is how I have the report laid out:
Page Header: [headVendor]
[Vendor](labels for counted fields)[MileagebyVendor]*[MileageYTDbyVendor]*
Area Header: [headArea]
[Area].....[MileagebyArea]*[MileageYTDbyArea]*
Detail: ...
[Month] (txtBoxes for counted fields)
Report Footer: ...
(sums for all types) [TotalMileage(system)]*[TotalMileageYTD(system)]*
The *ed items are my DLookUps. This is the Syntax I've used for the first item in the header:
-=-
So, my dilemma is: how do I do these "DLookUp"s so that they operate properly? I am at a loss as to why (when used with proper syntax, lifted both from the forums here and MS Help) they return "#Error"s. Is it because it's located in the section header and not "Detail"?
Any help is appreciated, folks. Thanks in advance!
I have a report which is bound to a particular query returning counted values by three criteria: Vendor, Area, and Month. From a seperate query (or pair of, depending on which way is quicker for the system), I need to extract a pair of summed Mileages (one total, one YTD), once for each Vendor, once for each Area, and a Total overall.
Here is how I have the report laid out:
Page Header: [headVendor]
[Vendor](labels for counted fields)[MileagebyVendor]*[MileageYTDbyVendor]*
Area Header: [headArea]
[Area].....[MileagebyArea]*[MileageYTDbyArea]*
Detail: ...
[Month] (txtBoxes for counted fields)
Report Footer: ...
(sums for all types) [TotalMileage(system)]*[TotalMileageYTD(system)]*
The *ed items are my DLookUps. This is the Syntax I've used for the first item in the header:
Code:
DLookUp("[SumOftrim2004]","qryTTotV","'[currentVendor]=' & Reports![rptY14_Totals]![currentVendor]")
So, my dilemma is: how do I do these "DLookUp"s so that they operate properly? I am at a loss as to why (when used with proper syntax, lifted both from the forums here and MS Help) they return "#Error"s. Is it because it's located in the section header and not "Detail"?
Any help is appreciated, folks. Thanks in advance!
Last edited: