Piggy-backing on Access 101 article e:
Question:
[color red]
I'm receiving #Name? error when using the Date() and other common functions when I install my db on another machine. It works OK on my machine.[/color]
'Standard' functions that seem to not work:
TRIM
LEFT
RIGHT
FORMAT
DATE
Reason: libraries on other users' machines may not be referenced properly
The three libraries that should be referenced are:
Visual Basic For Applications
Microsoft Access 8.0 Object Library
Microsoft DAO 3.51 Object Library (version can vary)
Fix:
Either manually reference the standard libraries on that user's machine (see
Using Microsoft Access to Refresh a Reference in the article), or copy this simple code from the article and run it with an autoexec macro when the users open the front-end (see
Automatically Refreshing References by Using Visual Basic for Applications in the article). It will referece each library properly. I am not a big VBA Programmer and I did this easily. It's simple.
Here is the article with the fix
http://support.microsoft.com/support/kb/articles/Q194/3/74.ASP
In fact it runs so fast that i've never seen the message pop up to the user.....
Note for Access 2000:
The error code is 3085 so you might want to change the If-Then code to:
Code:
if Err.Number = 3075 or Err.Number = 3085 Then