I was wondering if the solution to the ticket at the following link was ever found Pivot on multiple fields and export from Access.
I am trying to get results from an access table in the following format where: V1 (value 1) is a number and V2 (value 2) is timestamp (hh:mm:ss
).
Basically the report pulls for current month so eventually there would be a day at the top for every day of the month and a corresponding Number and time value for each day.
April 1 April 2 April 3
Manager V1 V2 V1 V2 V1 V2
John Doe 4 5:43:12 1 0:56:32 2 3:15:12
It is an elapsed time. I have been looking at Allen Browne's post and I am most of the way there I think. I created two tables: 1) for V1 which is a number of dials; and 2) for V2 which is total talk time. I then used Allen Browne's method but I cannot get the format of the time to be in hh:mm:ss
. It is that way in the base table but whatever I try it always seems to just show 1 digit.
TRANSFORM Sum(IIf([FldName]="DIALS",Val([DIALS].[DIALS]),
Val(Format([TALKTIME].[TT],"hh:nn:ss")))) AS TheValue
SELECT TALKTIME.Manager, DIALS.TW_Program_Code,
[DIALS]![VSE_FirstName] & " " & [DIALS]![VSE_Surname_Name] AS REP
FROM tblXtabColumns, TALKTIME
INNER JOIN DIALS
ON (TALKTIME.TW_Program_Code = DIALS.TW_Program_Code)
AND (TALKTIME.VSE_FirstName = DIALS.VSE_FirstName)
AND (TALKTIME.VSE_Surname_Name = DIALS.VSE_Surname_Name)
AND (TALKTIME.Period = DIALS.Period) AND (TALKTIME.[Manager] = DIALS.[Manager])
WHERE (((Month([TALKTIME].[Period])) = Month(Now())-1))
GROUP BY TALKTIME.Manager, DIALS.TW_Program_Code,
[DIALS]![VSE_FirstName] & " " & [DIALS]![VSE_Surname_Name]
PIVOT [DIALS].[Period] & " " & [FldName];