Run-time Error and Nz Function

  • Thread starter Thread starter Nadia
  • Start date Start date
N

Nadia

Guest
I have created a module that automatically updates the tables and runs queries in my database. I have a Docmd.runMacro which runs the macro that opens several Make table Queries. Within some these queries I use the Nz function, i.e., sumvar=Nz([fieldname1],0)+Nz([fieldname2],0).
The queries and macro run fine, but when I implement the Docmd.RunMacro "updatetables" in the module, I obtain a "Run-time error '3085' Undefined function 'Nz' in expression".
Can anyone shed some light on this error message.

thank you,
...nadia
 
This would imply that you don't have the correct reference to a DLL for that function. When in the module go to Tools References menu option. My references were:
Visual Basic for Applications
Microsoft Access 8.0 Object Library
Microsoft DAO 2.5/3.5 Compatibility Library
Microsoft forms 2.0 Object Library
Check if you have the same references. I tried using the NZ function and had no such errors.

Hope this helps?
 

Users who are viewing this thread

Back
Top Bottom