Mid function used in query and report undefined

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.
 
P

Paolo

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
 
S

SYCNewbie

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
 
D

Douglas J. Steele

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top