Hi, I am pretty new to Access 2003 and SQL. I am trying to have a count show up in a query to show specific barcode prefix data between the first and the last day of the previous month. I want to do this for the remaining 5 months so I know I would change the -1 to a -2 ect. Anyways, for some reason this is not working and I get a data mismatch error. Here is what I have typed in SQL using Access 2003.
SELECT Count(tblComponentInventory.Date) AS Month5ValveCount
FROM tblComponentInventory
WHERE (((tblComponentInventory.Date) Between DateAdd("dd",-(Day(DateAdd("mm",1,Now()))-1),DateAdd("mm",-1,Now())) And DateAdd("dd",-Day(DateAdd("m",1,Now())),DateAdd("m",-1,Now()))) AND ((tblComponentInventory.EquipmentID) Like "VC*" Or (tblComponentInventory.EquipmentID) Like "VO*"));
Any help would be highly appreciated!
TIA