Okay, I need some serious help here... I created an App in VB6.0 sp5. The app basically returns a list of qualified people, depending on the information you select, from a MS Access 97 DB. The App has always been working fine, on my machine, on other peoples' machines in the company. However when I started installing the app on other people's Laptops outside the builiding, I started getting an error message. The laptops do not have MS Access installed. I'm using ADO 2.1 to get to the database. The error that arises is "[Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression". Since it works fine on my machine and I can't duplicate the error, I have to kind of guess where the error is. The query I use to get the data is pretty big, but there's one or two lines that I suspect...
This is part of the where clause of my query. Could this be the problem? could be using cdate in a DateDiff function cause problems? Any help would be greatly appreciated.. Thanks...
Doug
Code:
strSQL2 = strSQL2 & " OR ((EnrollmentDate Is Not Null) AND " _
& "((Person.typeCode)=1) AND ((Person.locationID) Is Null) AND " _
& "((DateDiff('d',Now(),cdate(month(EnrollmentDate) & '/' & day(EnrollmentDate) & '/' & year(now())))) BETWEEN -90 And " _
& IIf(intListType = 7, 7, 30) & ")) "
This is part of the where clause of my query. Could this be the problem? could be using cdate in a DateDiff function cause problems? Any help would be greatly appreciated.. Thanks...
Doug