Tuesday, March 28, 2006

MS Access: FIX: Left function doesn't work

I have an old Access database. I found that a lot of scalar functions didn't work in it. I tried something simple like this:




select left(l_name, 15)
from test_table


and got this error:




Undefined function 'left' in expression.


I hit alt-F11 to bring up the Visual Basic for Applications (VBA) IDE, and immediately got this error message:




Your Microsoft Office Access dataabse or project contains a missing or broken reference to the file 'MSOWC.DLL' version 1.0


I check my references (tools->references) and saw an entry: "MISSING: Microsoft Office Web Components" which referenced the file "C:/Program Files/Microsoft Office/OFFICE10/MSOWC.DLL"



I went looking for the file-- the first thing I found out was that, althought I have an OFFICE10 directory, I'm running Office 2003 out of OFFICE11. There was no corresponding DLL in the OFFICE11 directory.



I simply unclicked the MISSING reference, saved the file, and it all works fine now. I suspect that the missing file is unneeded in 2003.

No comments:

Post a Comment

I moderate comments blog posts over 14 days old. This keeps a lot of spam away. I generally am all right about moderating. Thanks for understanding.