Q
QM
The query below is suppose to present all the vendor records where [New
Business Hold] = closed or open. The problem is, it does just that and only
that.
Is there a way to have the query present all vendors even if [New Business
Hold] = open or closed is zero, present a zero? When presenting this and
other data in a report, the subreport disappears if the specific vendor does
not have an "open" or "closed" in this field. When the vendor does meet this
criteria, the report looks presentable, but without it looks like something
is missing...
Here is my SQL data;
SELECT Vendors.supplier_name, Count([Concern Log].AssetID) AS
CountOfAssetID, [Concern Log].[SNew Business Hold], [New Business
Hold].NB_Status, Vendors.ID
FROM [New Business Hold] INNER JOIN (Vendors INNER JOIN [Concern Log] ON
Vendors.ID = [Concern Log].Supplier) ON [New Business Hold].NBID = [Concern
Log].[SNew Business Hold]
WHERE ((([Concern Log].Date) Between
DateSerial(Year(Date()),Month(Date()),Day(Date())-(Day(Date()+1))) And
DateSerial(Year(Date()),Month(Date())-12,Day(Date()-(Day(Date()-1))))))
GROUP BY Vendors.supplier_name, [Concern Log].[SNew Business Hold], [New
Business Hold].NB_Status, Vendors.ID
HAVING ((([New Business Hold].NB_Status)="open" Or ([New Business
Hold].NB_Status)="closed"))
ORDER BY Vendors.supplier_name;
Thanks in advance.
Business Hold] = closed or open. The problem is, it does just that and only
that.
Is there a way to have the query present all vendors even if [New Business
Hold] = open or closed is zero, present a zero? When presenting this and
other data in a report, the subreport disappears if the specific vendor does
not have an "open" or "closed" in this field. When the vendor does meet this
criteria, the report looks presentable, but without it looks like something
is missing...
Here is my SQL data;
SELECT Vendors.supplier_name, Count([Concern Log].AssetID) AS
CountOfAssetID, [Concern Log].[SNew Business Hold], [New Business
Hold].NB_Status, Vendors.ID
FROM [New Business Hold] INNER JOIN (Vendors INNER JOIN [Concern Log] ON
Vendors.ID = [Concern Log].Supplier) ON [New Business Hold].NBID = [Concern
Log].[SNew Business Hold]
WHERE ((([Concern Log].Date) Between
DateSerial(Year(Date()),Month(Date()),Day(Date())-(Day(Date()+1))) And
DateSerial(Year(Date()),Month(Date())-12,Day(Date()-(Day(Date()-1))))))
GROUP BY Vendors.supplier_name, [Concern Log].[SNew Business Hold], [New
Business Hold].NB_Status, Vendors.ID
HAVING ((([New Business Hold].NB_Status)="open" Or ([New Business
Hold].NB_Status)="closed"))
ORDER BY Vendors.supplier_name;
Thanks in advance.