I have an application that has been working for over a year with no issues and in the last month or 2 it has been causing 3075 errors on some PC's related to the use of the Date() function in sql statements. The application is in 97 and 2000 and the error has occured in both versions.
The error message goes
Function is not available in query expression Detail of SQL String 3075
I know that in general this is related to missing references but I have checked the PC's involved and this is not the case.
The application is in mde format when it causes the error, running an mdb version on the PC's do not cause the error so was wondering if it could be to do with different versions of the referenced files. If so is there any easy way to check this and discover the reference that is causing the problem.
The items that are referenced in the 97 version are
VBA - vba332.dll
Access Objects Library - msacc8.olb
DAO 3.51 - dao350.dll
Lotus Domino Objects - domobj.tlb
An example of the actual SQL string is as below
Changing the code to
will allow the code to run without errors but this means changing a fair number of instances of the use of the Date() function.
Any help or insght would be appreciated.
The error message goes
Function is not available in query expression Detail of SQL String 3075
I know that in general this is related to missing references but I have checked the PC's involved and this is not the case.
The application is in mde format when it causes the error, running an mdb version on the PC's do not cause the error so was wondering if it could be to do with different versions of the referenced files. If so is there any easy way to check this and discover the reference that is causing the problem.
The items that are referenced in the 97 version are
VBA - vba332.dll
Access Objects Library - msacc8.olb
DAO 3.51 - dao350.dll
Lotus Domino Objects - domobj.tlb
An example of the actual SQL string is as below
Code:
strSQL = "SELECT DISTINCT HolYrs.Year, HolYrs.Hol_Year, HolYrs.Yr_Start, HolYrs.Yr_End"
strSQL = strSQL + " FROM HolYrs WHERE (((Date()) Between [yr_start] And [yr_end]));"
Set rstHlYears = db.OpenRecordset(strSQL)
Changing the code to
Code:
strSQL = "SELECT DISTINCT HolYrs.Year, HolYrs.Hol_Year, HolYrs.Yr_Start, HolYrs.Yr_End"
strSQL = strSQL + " FROM HolYrs WHERE (((#" & Format(Date(),"mm/dd/yyyy") & "#) Between [yr_start] And [yr_end]));"
Set rstHlYears = db.OpenRecordset(strSQL)
Any help or insght would be appreciated.