Undefined function 'MID'

G

guy.jara

I got caught up on this and I wanted to put it out into the ether. I
was experiencing a problem where a Jet SQL query was throwing an error
over the use of the very common MID function in the SQL statement. I
checked references and I had a reference to the VBA library, as well
as the Access 11.0 object library.

Then I checked with a colleague and they directed me to establish a
reference to the MS Visual Basic for Applications Extensibility
library. When I added that to my list of references, voila!, problem
solved.
 
A

Allen Browne

The Mid() function doesn't require the VBA Extensibility library. However,
if *any* reference is broken, the code fails. Similarly if something else
needs a library, the code in your database won't compile, and everything is
broken.

It would therefore seem that you have some other code somewhere in your
database that needed the extra library. Or perhaps it was the kind of
corruption that could have been solved with a decompile.
 

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