N
Nick I
This probably has a really simple answer but I just can't think right now....
I have a form that is attached to a recordsource. There are only 3 records
in the query it pulls from. Here is the SQL to that query:
PARAMETERS [Forms]![Daily Call Center Reports]![FromDate] DateTime,
[Forms]![Daily Call Center Reports]![ToDate] DateTime; TRANSFORM
IIf((Sum([callsoffered])-Sum([Abn Calls Adjusted]))>0,Sum([SL
Calls])/(Sum([callsoffered])-Sum([Abn Calls Adjusted])),"") AS SL SELECT
MastrSkillList.[SUB CATEGORY], Format(IIf((Sum([callsoffered])-Sum([Abn Calls
Adjusted]))>0,Sum([SL Calls])/(Sum([callsoffered])-Sum([Abn Calls
Adjusted])),""),"Percent") AS Average FROM MastrSkillList INNER JOIN
MastrSkillStats ON MastrSkillList.SKILLID=MastrSkillStats.split WHERE
(((MastrSkillList.[SUB CATEGORY]) In ('strategic','non strategic','jpf')) AND
((Format([DateTime],"Short Date"))=Date()) AND ((Format([DateTime],"Long
Time")) In (#12/30/1899 8:0:0#,#12/30/1899 8:30:0#,#12/30/1899
9:0:0#,#12/30/1899 9:30:0#,#12/30/1899 10:0:0#,#12/30/1899
10:30:0#,#12/30/1899 11:0:0#,#12/30/1899 11:30:0#,#12/30/1899
12:0:0#,#12/30/1899 12:30:0#,#12/30/1899 13:0:0#,#12/30/1899
13:30:0#,#12/30/1899 14:0:0#,#12/30/1899 14:30:0#,#12/30/1899
15:0:0#,#12/30/1899 15:30:0#,#12/30/1899 16:0:0#,#12/30/1899
16:30:0#,#12/30/1899 17:0:0#,#12/30/1899 17:30:0#,#12/30/1899
18:0:0#,#12/30/1899 18:30:0#,#12/30/1899 19:0:0#,#12/30/1899 19:30:0#)))
GROUP BY MastrSkillList.[SUB CATEGORY] ORDER BY MastrSkillList.[SUB CATEGORY]
PIVOT Format([DateTime],"Long Time") In ("8:00:00 AM","8:30:00 AM","9:00:00
AM","9:30:00 AM","10:00:00 AM","10:30:00 AM","11:00:00 AM","11:30:00
AM","12:00:00 PM","12:30:00 PM","1:00:00 PM","1:30:00 PM","2:00:00
PM","2:30:00 PM","3:00:00 PM","3:30:00 PM","4:00:00 PM","4:30:00 PM","5:00:00
PM","5:30:00 PM","6:00:00 PM","6:30:00 PM","7:00:00 PM","7:30:00 PM");
Pretty complicated I know, but all I want to pull is the column titled
"Average". I do NOT want to use DLookup as that is a time constraint. There
will always only be 3 recrods returned in this query. I have 3 textboxes. The
first and last textboxes are fine, I can just get the value using
First([Average]) and Last([Average])
How do I get that middle value????
I have a form that is attached to a recordsource. There are only 3 records
in the query it pulls from. Here is the SQL to that query:
PARAMETERS [Forms]![Daily Call Center Reports]![FromDate] DateTime,
[Forms]![Daily Call Center Reports]![ToDate] DateTime; TRANSFORM
IIf((Sum([callsoffered])-Sum([Abn Calls Adjusted]))>0,Sum([SL
Calls])/(Sum([callsoffered])-Sum([Abn Calls Adjusted])),"") AS SL SELECT
MastrSkillList.[SUB CATEGORY], Format(IIf((Sum([callsoffered])-Sum([Abn Calls
Adjusted]))>0,Sum([SL Calls])/(Sum([callsoffered])-Sum([Abn Calls
Adjusted])),""),"Percent") AS Average FROM MastrSkillList INNER JOIN
MastrSkillStats ON MastrSkillList.SKILLID=MastrSkillStats.split WHERE
(((MastrSkillList.[SUB CATEGORY]) In ('strategic','non strategic','jpf')) AND
((Format([DateTime],"Short Date"))=Date()) AND ((Format([DateTime],"Long
Time")) In (#12/30/1899 8:0:0#,#12/30/1899 8:30:0#,#12/30/1899
9:0:0#,#12/30/1899 9:30:0#,#12/30/1899 10:0:0#,#12/30/1899
10:30:0#,#12/30/1899 11:0:0#,#12/30/1899 11:30:0#,#12/30/1899
12:0:0#,#12/30/1899 12:30:0#,#12/30/1899 13:0:0#,#12/30/1899
13:30:0#,#12/30/1899 14:0:0#,#12/30/1899 14:30:0#,#12/30/1899
15:0:0#,#12/30/1899 15:30:0#,#12/30/1899 16:0:0#,#12/30/1899
16:30:0#,#12/30/1899 17:0:0#,#12/30/1899 17:30:0#,#12/30/1899
18:0:0#,#12/30/1899 18:30:0#,#12/30/1899 19:0:0#,#12/30/1899 19:30:0#)))
GROUP BY MastrSkillList.[SUB CATEGORY] ORDER BY MastrSkillList.[SUB CATEGORY]
PIVOT Format([DateTime],"Long Time") In ("8:00:00 AM","8:30:00 AM","9:00:00
AM","9:30:00 AM","10:00:00 AM","10:30:00 AM","11:00:00 AM","11:30:00
AM","12:00:00 PM","12:30:00 PM","1:00:00 PM","1:30:00 PM","2:00:00
PM","2:30:00 PM","3:00:00 PM","3:30:00 PM","4:00:00 PM","4:30:00 PM","5:00:00
PM","5:30:00 PM","6:00:00 PM","6:30:00 PM","7:00:00 PM","7:30:00 PM");
Pretty complicated I know, but all I want to pull is the column titled
"Average". I do NOT want to use DLookup as that is a time constraint. There
will always only be 3 recrods returned in this query. I have 3 textboxes. The
first and last textboxes are fine, I can just get the value using
First([Average]) and Last([Average])
How do I get that middle value????