Compile Error

Norie

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

Every time I try to use functions like Len, IsNull etc in an expression in a query I get Compile Error.

Access lists the functions in the Expression Builder and capitalizes them when I key them in.

Anybody got any ideas?
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Norie,
You most likely already checked this, but do you have any missing references? I know I had some major problems with string formula's when I had a missing reference in the past. I'm not sure why?? Doesn't make a whole lot of sense, but removing the missing reference fixed it.

Cal

PS-I've used both formula's in expression in Access 97, without any issues, so they do work. I haven't tried them on Access 2003, which I am now on, but they should still work.
 
Upvote 0
Adding to Cal's comments, if you have just upgraded an existing database to a higher Access version the references will need to be fixed: Tools | References in any module. You'll see <Missing> for one or more libraries. Remove the ticks, select newer versions from the list and you should be OK.
It's a known Access bug...

Denis
 
Upvote 0
Denis

Tried your suggestion but no luck.

I also tried 'Repairing' MS Office and I'm still getting the Compile Error.

It's not a big deal as it is occuring with 2000 which I only use to help people on this forum when I am at home whereas I use 97 to help when I'm at work and there doesnt appear to be any problems there.

Still I can't quite understand why it is happening.
 
Upvote 0
Norie, are these databases that you created in Access 2000, or have you sent them home and opened them there?
If they were created in Access 2000 then I'm stumped. I have only had this issue with upgraded databases.
BTW, the original post had <Missing> in single chevrons but they were interpreted as a tag and removed from the post...

Denis
 
Upvote 0
Denis, Cal

I created a brand new database and imported the query causing the problem and the table it was based on.

Guess what - no error.

I did have some code in the original database - perhaps that was causing the problem.

Doesn't matter now anyway as I've deleted the original - I was only using for testing.
 
Upvote 0

Forum statistics

Threads
1,221,829
Messages
6,162,229
Members
451,756
Latest member
tommyw

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