I have been stuck on this for about a month. I am trying to get a query to count and show the last month of specific barcode prefix data that is between the first and the last day of the last month.
This is what I got so far, but I get a data mismatch error. I’m also using Access 2003 and I am pretty much a novice to Access and SQL.
SELECT Count(tblComponentInventory.Date) AS Month5ValveCount
FROM tblComponentInventory
WHERE (((tblComponentInventory.Date)=DateAdd(“dd”,-(Day(DateAdd(“mm”,1,”now()”))-1),DateAdd(“mm”,-1,”now()”)) And (tblComponentInventory.Date)=DateAdd(“dd”,-Day(DateAdd(“m”,1,”now()”)),DateAdd(“m”,-1,”@Today”))) AND ((tblComponentInventory.EquipmentID) Like “??VC*” Or (tblComponentInventory.EquipmentID) Like “??VO*”));
Any help would be highly appreciated.
TIA