Where are you getting the date to use as criteria? A form?
If you want to select all records where sales date is equal to 12/1/2019 (for Jan 2020), do you enter a date like 12/1/2019 (the SaleDate) or 1/5/2020 (any date in the month)?
I would not think you would use the field "SalesDate".
So lets say the table name is "tblSales"
There is a form named "frmSearch "with an unbound control named "ubSaleDate".
You would enter 12/1/2019 to get the sales records for January 2020
The query would be
Code:
SELECT tblSales.SaleID_PK, tblSales.RecDate, tblSales.SaleDate
FROM tblSales
WHERE tblSales.SaleDate=[forms]![frmSearch].[ubSalesDate];
If you wanted to enter ANY date in January 2020 to get Dec sales:
Code:
SELECT tblSales.SaleID_PK, tblSales.RecDate, tblSales.SaleDate
FROM tblSales
WHERE (((tblSales.SaleDate)=DateSerial(Year([Forms]![frmSearch].[ubSalesDate]),Month([Forms]![frmSearch].[ubSalesDate])-1,1)));