I am trying to run an update query but it is giving me "Data type mismatch in criteria expression". It was working just fine before but now, all of sudden it started giving me this error. I tried doing research and also checked in stack overflow but could not find the solution. I only have one criteria expression in my query.
UPDATE dbo_tblGoods INNER JOIN qryValidate
ON dbo_tblGoods.MaterialID = qryValidate.MaterialID
SET dbo_tblGoods.BarcodeType = [qryValidate]![BarCodeType],
dbo_tblGoods.BarCode = [qryValidate]![BarCode]
WHERE (((Right$([NewBarCode],4))="GOOD"));
Also, qryValidate is:
SELECT Parts.MaterialID, Validate_UPC([Parts]![Barcode],[Parts]![BarcodeType]) AS NewBarCode,
Parts.BarCodeType, Parts.BarCode
FROM dbo_tblgoods INNER JOIN Parts
ON dbo_tblgoods.MaterialID = Parts.MaterialID;