Access built-in functions like Year() and Date() are not recognized

為{幸葍}努か 提交于 2019-12-01 21:21:11

There is a problem with the referenced libraries in your project.

Open the VBA Editor ("Database Tools"->"Visual Basic" in the Ribbon) there go to the menu "Tools"->"References". Check if there is any library marked with "missing". Reinstall those libraries or change their path by removing them and adding them using the "Browse" button.

Generally you should remove any library you do not actually use in your project.

If that does not help, remove all the libraries (if possible, some are built-in and can not be removed) and add them again.

After changing the libraries use the menu "Debug"->"Compile yourProject". That should show error messages if there are obvious problems with the libraries in the VBA code. It will however not detect any problems with expressions used in queries or Form-controls.

If none of the steps above helped fixing the problem. You could create a new Access database and then import all the objects from your old database into the new one unsing "External Data"->"Access" in the Ribbon.

urtags

I had a similar problem where all built-in functions stopped working in a database. All the references checked out fine.

Accidentally, it resolved by renaming the database so I could restore an old version. When re-opening the renamed database I was asked to make it trusted. After that, the built-in functions worked again.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!