I have been using a query as part of a report to display Last Sample Information:

SELECT qryLastSampleDate.SampleSiteID, qryLastSampleDate.MaxOfSampleDate, Mid$([SampleLabCode],3,5) AS LocCode, tblStaff.StaffInitials
FROM qryLastSampleDate INNER JOIN (tblStaff INNER JOIN ((tblSite INNER JOIN tblSample ON tblSite.SiteID = tblSample.SampleSiteID) INNER JOIN tblSiteDetail ON tblSite.SiteID = tblSiteDetail.SiteDetailSiteID) ON tblStaff.StaffID = tblSample.SampleBy) ON (qryLastSampleDate.MaxOfSampleDate = tblSample.SampleDate) AND (qryLastSampleDate.SampleSiteID = tblSample.SampleSiteID)
WHERE (((tblSite.SiteStatus)=2) AND ((tblSiteDetail.SiteDetailCategory)<>9))
GROUP BY qryLastSampleDate.SampleSiteID, qryLastSampleDate.MaxOfSampleDate, Mid$([SampleLabCode],3,5), tblStaff.StaffInitials
HAVING (((Mid$([SampleLabCode],3,5)) Not Like "99*"));

This report printed as recently as yesterday (02/02/09), but when run today (02/03/09) is throws a "Data Type Mismatch in criteria expression" error.
Data type of [SampleLabCode] is Text, Mid$ gives String, Not Like "99*" is a string operator...

I changed the query to:

SELECT qryLastSampleDate.SampleSiteID, qryLastSampleDate.MaxOfSampleDate, Mid$([SampleLabCode],3,5) AS LocCode, tblStaff.StaffInitials
FROM qryLastSampleDate INNER JOIN (tblStaff INNER JOIN ((tblSite INNER JOIN tblSample ON tblSite.SiteID = tblSample.SampleSiteID) INNER JOIN tblSiteDetail ON tblSite.SiteID = tblSiteDetail.SiteDetailSiteID) ON tblStaff.StaffID = tblSample.SampleBy) ON (qryLastSampleDate.MaxOfSampleDate = tblSample.SampleDate) AND (qryLastSampleDate.SampleSiteID = tblSample.SampleSiteID)
WHERE (((tblSite.SiteStatus)=2) AND ((tblSiteDetail.SiteDetailCategory)<>9) AND ((tblSample.SampleLabCode) Not Like "*99*"))
GROUP BY qryLastSampleDate.SampleSiteID, qryLastSampleDate.MaxOfSampleDate, Mid$([SampleLabCode],3,5), tblStaff.StaffInitials;

And Now the report works once again. I don't think any of the Microsoft libraries were updated in the last 24 hours (I'm checking with IT). ***Note, IT says "a roll-up to .net 3.5 SP1"...so might this have had an effect on the SQL interpreter.

Any ideas anyone?

Thanks.