Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MID function in Access XP

Status
Not open for further replies.
Jun 24, 2004
23
US
I cannot use the MID function in an expression in one of my access databases. The error says the function is undefined. Now when I create the expression using that function in any other database it works.

Suggestions?

Redtwister
 
Hit ALT+F11 to enter VBE. In Tools | References, see if any of the references are marked as "missing", "invalid" or something like that. Uncheck the reference (you may have to "recheck" an existing reference with the same name, but try first without).

BTW - in the Related Forums box at right, you'll find there are several "pure" Access fora. And Welcome to Tek-Tips, here's also a faq on how to get the most out of the membership faq222-2244.

Roy-Vidar
 
Thanks Roy,

But that did not work. It is a bit odd, since nothing seems to be missing of the references and re-checking it did not help.

Any other suggestions?

Cheers
 
This is usually caused by one of the references being broken, so I don't know what else. There might be some challenges relating to using user defined functions in reports where the function is not placed in a standard module, but within the report module (see last link). This can sometimes cause access not to recognize some of the inbuilt functions.

If you're performing something in code, you migth try prefixing the function:

[tt]VBA.Mid$(strText,5)[/tt]

Sources; "Undefined Function in Expression" Error Message When You Open a Query That References a Function, "Undefined Function in Expression" Error Message

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top