Undefined Function Mid

I am trying to use the Mid worksheet function. I can get it to work on my laptop (which I set up) but when I try to use it on the company desktop, I get "Undefined function 'Mid' in expression". Same results with Mid$.

Anybody have any ideas? Other than calling the help desk to fix my installation of Access...
LVL 6
robertjbarkerAsked:
Who is Participating?
 
flavoCommented:
There you go.  Not even sure what that's used for.

Untick it, and compile your code, does it error anywhere during the compile?
If not, the Mid should work
Dave
0
 
flavoCommented:
Hi robertjbarker,
Open VBA, and select Tools -> References. Are any marked as missing or broken?
Dave :-)
0
 
GRayLCommented:
Code with errors can do strange things to Access functions.  Ctl-G or Alt-F11 to get to VB Editor.  Click Debug and Compile.  Comment out or Delete any highlighted code.  Then go to the Immediate Pane and type:

? Mid("GRayL",2,3)
Ray '<--this is what you should get.

Before that, you may want to click on Tools, References, and check for any 'Missing' items.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
robertjbarkerAuthor Commented:
There are a large number of items left unchecked. One of the checked items is noted as missing:
"MISSING: Microsoft DAO 2.5/3.5 Compatibility Library"
0
 
robertjbarkerAuthor Commented:
? Mid("GRayL",2,3)

is changed to

Print Mid("GRayL",2,3)

And the error comes up "Compile error: Invalid outside procedure"
0
 
Jim P.Commented:
Dave,

That was from one of the earlier JET/MDACs. It's hanging around from Office95 IIRC.
0
 
robertjbarkerAuthor Commented:
That's about the dumbest thing I can think of. Something is missing, untick it (meaning ignore it?), and then things can be found.

But that worked, and thanks.

I like SQL Server.
0
 
flavoCommented:
Yeah.. I don't really get it either.. Common problem though, glad it's all sorted :P
Dave
0
 
flavoCommented:
> That was from one of the earlier JET/MDACs. It's hanging around from
> Office95 IIRC.
Well before my time :P
Dave
0
 
Jim P.Commented:
You'll want to untick it on your laptop as well.  Cause if you copy it to your WS again it will have the same problem.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.