Undefined Function Mid in Expression

paul29berks

Active Member
Joined
Mar 15, 2004
Messages
293
I have written a statement within a select query that modified the format of a date value:

Date of Birth: IIf([Date_Of_Birth]="00000000","",DateValue(Mid([Date_Of_Birth],7,2) & "/" & Mid([Date_Of_Birth],5,2) & "/" & Mid([Date_Of_Birth],1,4)))

But receive the error:

Undefined Function Mid in Expression

Can anyone help?

thanks
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

pritcham

Board Regular
Joined
Oct 26, 2005
Messages
128
Hi

What version of Access are you using? I've got 2000 here and just checked your formula and it works fine. From the look of your code, I assume that your DOBs are currently stored in yyyymmdd format?

Martin
 
Upvote 0

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,367
Office Version
  1. 365
Platform
  1. Windows
paul

That sounds to me as though you might have a corrupt database.

Does that expression work if you create a new database and import the tables/queries from the original?
 
Upvote 0

SydneyGeek

MrExcel MVP
Joined
Aug 5, 2003
Messages
12,251
If you have upgraded the database from 97 to 2000 or higher, this often happens.

Go into any module and check Tools | References. It is likely that one of them will be marked as Missing. Note the name of the library, deselect the missing reference, scroll down the list and select the version that you have. Click OK and try the query again

Denis
 
Upvote 0

Forum statistics

Threads
1,195,619
Messages
6,010,736
Members
441,567
Latest member
Flitbee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top