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

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
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
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
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,214,920
Messages
6,122,269
Members
449,075
Latest member
staticfluids

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
Back
Top