georgesOne
Technical User
Hi All:
I have the following union query:
SELECT TOP 5 qryGraph00.FNumber, qryGraph00.FDescription, qryGraph00.CStress1, "1" As fRank
FROM qryGraph00
WHERE (((qryGraph00.Model)="3")) And qryGraph00.CStress1>0
ORDER BY qryGraph00.CStress1
UNION SELECT qryGraph00.FNumber, qryGraph00.FDescription, qryGraph00.CStress1, "0" As fRank
from qryGraph00
WHERE (((qryGraph00.Model)="3")) And qryGraph00.FNumber = Forms!frmDisplay.tbxFNumber
ORDER BY fRank, qryGraph00.CStress1;
This query feeds directly a graphic, which shows the values FDescription as x-Value and CStress1 As y-Value. This works as desired (6 value pairs, 5 from the first select part, 1 from the "Union" part), if the "Union" part produces a recordset, but gives only the top 5 values (5 value pairs)if the "Union" part does not produce a recordset (because the table does not contain a value for Model = "3").
How can I manage that the Graphic would show "NA" for the x-Value as FDescription and 0 for the y-value as CStress1 if the "Union" part does not return a recordset?
Thanks for any advice.
georges
I have the following union query:
SELECT TOP 5 qryGraph00.FNumber, qryGraph00.FDescription, qryGraph00.CStress1, "1" As fRank
FROM qryGraph00
WHERE (((qryGraph00.Model)="3")) And qryGraph00.CStress1>0
ORDER BY qryGraph00.CStress1
UNION SELECT qryGraph00.FNumber, qryGraph00.FDescription, qryGraph00.CStress1, "0" As fRank
from qryGraph00
WHERE (((qryGraph00.Model)="3")) And qryGraph00.FNumber = Forms!frmDisplay.tbxFNumber
ORDER BY fRank, qryGraph00.CStress1;
This query feeds directly a graphic, which shows the values FDescription as x-Value and CStress1 As y-Value. This works as desired (6 value pairs, 5 from the first select part, 1 from the "Union" part), if the "Union" part produces a recordset, but gives only the top 5 values (5 value pairs)if the "Union" part does not produce a recordset (because the table does not contain a value for Model = "3").
How can I manage that the Graphic would show "NA" for the x-Value as FDescription and 0 for the y-value as CStress1 if the "Union" part does not return a recordset?
Thanks for any advice.
georges