A
alvarjo9 via AccessMonster.com
Hi,
Please help, I am trying to use the switch function. Below is query used.
But my problem is when I use the query to display in the report it return
blank spaces if there is no value in B, C and D column. column if no A
calibre and so on.
Please assist if anyone knows how to just make them in one record if no value
satisfy for each A, B C and D calibre. I am not sure if there is any other
command to use
thanks
SELECT Scores.Name, switch(Scores.Calibre="A",Scores.Date) AS DATEa, switch
(Scores.Calibre="B",Scores.Date) AS DATEb, switch(Scores.Calibre="C",Scores.
Date) AS DATEc, switch(Scores.Calibre="D",Scores.Date) AS DATEd
FROM Scores
WHERE Scores.Name=Forms!LicenseRenewalForm!cboName
AND (((Scores.Date) In (SELECT TOP 6 X.Date FROM Scores As X WHERE X.Name =
Scores.Name And X.Calibre = Scores.Calibre)))
GROUP BY Scores.Name, Scores.Calibre, Scores.Date, Scores.Date;
Please help, I am trying to use the switch function. Below is query used.
But my problem is when I use the query to display in the report it return
blank spaces if there is no value in B, C and D column. column if no A
calibre and so on.
Please assist if anyone knows how to just make them in one record if no value
satisfy for each A, B C and D calibre. I am not sure if there is any other
command to use
thanks
SELECT Scores.Name, switch(Scores.Calibre="A",Scores.Date) AS DATEa, switch
(Scores.Calibre="B",Scores.Date) AS DATEb, switch(Scores.Calibre="C",Scores.
Date) AS DATEc, switch(Scores.Calibre="D",Scores.Date) AS DATEd
FROM Scores
WHERE Scores.Name=Forms!LicenseRenewalForm!cboName
AND (((Scores.Date) In (SELECT TOP 6 X.Date FROM Scores As X WHERE X.Name =
Scores.Name And X.Calibre = Scores.Calibre)))
GROUP BY Scores.Name, Scores.Calibre, Scores.Date, Scores.Date;