How to fix mid function

accessman2

Registered User.
Local time
Today, 08:55
Joined
Sep 15, 2005
Messages
335
I have a question:

SELECT DateSerial(2000+mid([enter],3,2),Mid([enter],1,2),1) AS datevalue;

it works in 2000 windows,
but it doesn't works in XP windows.

Why?
The error message the function mid has a problem.

How can I fix the problem in XP widows.

Thanks.
 
I'd say you have a reference problem, search here for missing reference
 
DateSerial is actually an Excel function. If you didn't provide proper references to the Excel library then you screwed up. And don't forget that a new OS gives you a new registry. References reside in the registry, not in the DB itself. So a new OS killed your old references. The Excel reference is probably your culprit.
 
The_Doc_Man said:
DateSerial is actually an Excel function. If you didn't provide proper references to the Excel library then you screwed up. And don't forget that a new OS gives you a new registry. References reside in the registry, not in the DB itself. So a new OS killed your old references. The Excel reference is probably your culprit.
Date serial WILL work with Excel VBA, but is not in itself an Excel function. But you are right that he should be checking references. I am guessing he's missing the Visual Basic or Applications reference, or the reference to his Access application (or particular Office application).
 

Users who are viewing this thread

Back
Top Bottom