Okay. I have a report grouped by Agent and sorted by date. I cannot put my
query [Agent Setter ACD Calls Query] (which is now named
[ARLAgentSetterACDQuery]) into my record source because I have a different
query set as my record source, unless I can have two queries as a record
source, but I didn't know this was possible. I cannot add my data from
[ARLAgentSetterACDQuery] in my record source query because it skews the rest
of my data because of the way it is recorded. It almost works like this:
=DLookUp("[SumOfACD Calls Received]","[ARLAgentSetterACDQuery]","[Agent
Name]='" & [Agent Name] & "'")
But it is only giving me the first record for each agent. I need it by date
also. For Instance, Each agent has 5 days of data, well it is showing the
first days data for every day. I tried to add: And "[Date]='" & [Date] &
"'"), but it does the same thing.
Thanks so much for the help. I have done plenty of simple queries and
reports in Access, but this one is much more complicated than I have dealt
with.
-Brent
Duane Hookom said:
What section is the control? What is your current expression?
Is there a reason why you don't add [Agent Setter ACD Calls Query] to your
report's recordsource joining the Agent Name fields? This would allow you to
add the SumOfACD Calls Received field to the report.
BTW: you should consider finding a better naming convention.
--
Duane Hookom
MS Access MVP
Thanks for the suggestions, but it is still coming up with the #Error on
my
reports. When I used the Me it asked me for parameter values for Me. I
don't know why this is being so difficult.
:
On Thu, 14 Oct 2004 13:15:05 -0700, Brent wrote:
I am using a DLookup Function on my reports. It works fine until I
add my
criteria. I need it by Agent. Right now I have:
=DLookUp("SumOfACD Calls Received","Agent Setter ACD Calls
Query","Agent
Name = ' " & [Agent Name] & " ' ")
I'm getting an error on my reports. Any help would be great.
1) Remove the spaces between the single and double quotes in the
Where clause.
2) You have a space in the 'Agent Name' field, so you MUST enclose it
within brackets (in both instances, as well as the other field and
table names with spaces).
=DLookUp("[SumOfACD Calls Received]","[Agent Setter ACD Calls
Query]","[Agent Name] = '" & [Agent Name] & "'")
Also, if there is any chance that the [Agent Name] value will contain
a single quote (i.e. O'Brien), use:
"[Agent Name] =" & Chr(34) & [Agent Name] & Chr(34) & "")