I was working on a project in MS Access this afternoon and kept getting a "Undefined function 'Dir' in query expression" error message whenever I opened certain forms that had worked fine in the past. I googled the error message and it didn't come up with much. Most everything I found pointed to a missing reference. However, when I opened up my references everything looked normal and none were marked as "Missing" as you often see with MS Access. Since I haven't worked in Access for a while, it took me quite a while to remember SandBox Mode. It dawned on me that I had not been seeing the Security Warning: Unsafe expressions are not blocked dialog on startup for a while. Sure enough SandBox mode was set too high and was blocking the expressions in my query from working. Changing the security level fixed the problem. For a good article explaining Sandbox mode and how to change it etc, see How to Avoid the Sandbox Storm