Mid function used in query and report undefined

  • Thread starter Thread starter SYCNewbie
  • Start date Start date
S

SYCNewbie

My access database (format 2000) ran fine on Access 2003 under Windows XP
perfectly fine. When I got the file into Access 2007 running under Windows
Vista, Access complained the Mid function I used in query and reports as
UNDEFINED. The error message is "Undefined function 'Mid' in expression". I
cannot run my query or see my report because of this error.
I tried converting the file into Access 2007 format, it didn't work either.
 
Hi SYCNewbie,

In your DB open a form in structure and goto the vba windows. On the menu
tools choose references and check if some reference is missing. In this case
click on this reference and look at the bottom of the references windows the
old location of the dll used by the missing component and browse to find the
new location of the dll.

HTH Paolo
 
Hi Paolo,

Thank you for your help. I am missing Microsoft Office Control 1.0
Type Library in my Reference. However, I am not sure whether this is the real
culprit. Mid function is such a basic function of Access. But I'll try to see
fixing this will work or not. Thanks!

SYCNewbie
 
Any missing reference can lead to problems with VBA functions (such as Mid).

When you attempt to use a function that's contained in an internal
reference, Access searches through all of the referenced libraries until it
finds the referenced function. The VBA library is actually the last library
Access checks. This allows you to create your own functions with the same
names as the VBA functions, and have your function be used rather than VBA's
(note that be able to do this doesn't actually mean that it's a good idea to
do it...) As soon as Access runs into a problem with a reference, it stops
looking, rather than continuing to the next library. Hence, the VBA library
is never checked.
 
Back
Top