I am running a report that I want to only show data where certin controls contain a Null value. I am using a from to enter the search criteria (a date) and I want it to only return the records that match the specified date and do not have information entered in for the mileage. This is what I am using:
SELECT tblMonthlyMaintenance.MonthlyMaintenanceID, tblMonthlyMaintenance.GSAID, tblMonthlyMaintenance.DivisionPOCID, tblMonthlyMaintenance.DueDate, tblMonthlyMaintenance.ManitenanceRequired, tblMonthlyMaintenance.Miliage, tblMonthlyMaintenance.Complete, tblMonthlyMaintenance.CompleteDate, tblVehicles.[Bumper Number], tbluShop.Shop, tbluDrivers.Name, [tbluDivision List].FullDivisionName, [tbluDivision List].DivisionID, tblVehicles.GSATagNumber
FROM (([tbluDivision List] INNER JOIN tbluShop ON [tbluDivision List].DivisionID = tbluShop.DivisionID) INNER JOIN (tbluDrivers INNER JOIN tblVehicles ON tbluDrivers.[Driver ID] = tblVehicles.[Driver ID]) ON tbluShop.ShopID = tblVehicles.ShopID) INNER JOIN tblMonthlyMaintenance ON tblVehicles.GSATagNumber = tblMonthlyMaintenance.GSAID
WHERE (((tblMonthlyMaintenance.DueDate)=[Forms]![frmsMaintenanceLog_Search]![Due Date]) AND ((tblMonthlyMaintenance.CompleteDate) Is Null));
When I run it without AND ((tblMonthlyMaintenance.CompleteDate) Is Null)); It works just fine. It is when I enter the rest of the condition that it returns a blank report. However when I run the query it returns the correct information.
Any ideas on what I am doing wrong?
Thanks!
Kat