[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Undefined Function Mid

Posted on 2006-03-23
10
Medium Priority
?
1,285 Views
Last Modified: 2007-12-19
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...
0
Comment
Question by:robertjbarker
  • 4
  • 3
  • 2
  • +1
10 Comments
 
LVL 34

Expert Comment

by:flavo
ID: 16270984
Hi robertjbarker,
Open VBA, and select Tools -> References. Are any marked as missing or broken?
Dave :-)
0
 
LVL 44

Expert Comment

by:GRayL
ID: 16271043
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
 
LVL 6

Author Comment

by:robertjbarker
ID: 16271087
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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 34

Accepted Solution

by:
flavo earned 500 total points
ID: 16271156
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
 
LVL 6

Author Comment

by:robertjbarker
ID: 16271174
? Mid("GRayL",2,3)

is changed to

Print Mid("GRayL",2,3)

And the error comes up "Compile error: Invalid outside procedure"
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 16271210
Dave,

That was from one of the earlier JET/MDACs. It's hanging around from Office95 IIRC.
0
 
LVL 6

Author Comment

by:robertjbarker
ID: 16271234
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
 
LVL 34

Expert Comment

by:flavo
ID: 16271245
Yeah.. I don't really get it either.. Common problem though, glad it's all sorted :P
Dave
0
 
LVL 34

Expert Comment

by:flavo
ID: 16271251
> That was from one of the earlier JET/MDACs. It's hanging around from
> Office95 IIRC.
Well before my time :P
Dave
0
 
LVL 38

Expert Comment

by:Jim P.
ID: 16271785
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

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question