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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

flavoCommented:
Hi robertjbarker,
Open VBA, and select Tools -> References. Are any marked as missing or broken?
Dave :-)
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.
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"
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
robertjbarkerAuthor Commented:
? Mid("GRayL",2,3)

is changed to

Print Mid("GRayL",2,3)

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

That was from one of the earlier JET/MDACs. It's hanging around from Office95 IIRC.
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.
flavoCommented:
Yeah.. I don't really get it either.. Common problem though, glad it's all sorted :P
Dave
flavoCommented:
> That was from one of the earlier JET/MDACs. It's hanging around from
> Office95 IIRC.
Well before my time :P
Dave
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.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.