I think I screwed up my database. I have individual queries for customers that I use to determine inventory to buy for them. The NOW() function is used in numerous expressions along with the ABS function. While I had the database open I tried to teach myself some VBA by creating a module that would delete the importerror files, however when it would not work i just abandoned the effort as I was not quite sure what the message was trying to tell me. I would save learning VBA for another day. When I closed out the Database I was asked if I wanted to saves the modules and I indicated no. I re-open the database and tried to run the queries and I got the following message: Unknown function name in query expression NOW(). I deleted all fields that referenced NOW() and ran it again. This time it came back with: unknown function name in query expression ABS. Did I some how delete the module that has all of the functions that are used by Access. Any help would be appreciated. Thank you Gene
Michael: The compact and repair did not work so I created a new database and imported the components. It is working fine now. Thank you all for your advice.
Regards
Gene Haines
Phone: 267-527-1113
email@removed
On further investigation, the majority of functions are in a library called VBA, and a couple in the MSOffice library, not in the core Access executable. Check tools>references in the code=0D=0Aeditor to be sure they are check-marked and not missing.
Phil
Date sent:=09Sat, 11 Dec 2010 18:10:22 -0500=0D=0AFrom:=09"Michael Meyers-Jouan via=
access-l" email@removed=0D=0ASubject:=09RE: [access-l] U=
nknown function name in query expression=0D=0AKeywords:=09funtion name,quer=
y expression=0D=0ATo:=09philmarcus email@removed=0D=0ASend reply to:=09acce=
email@removed=0D=0A=0D=0A=0D=0A=0D=0APosted by Michael Meyers-J=
ouan (Software Developer)=0D=0Aon Dec 11 at 6:07 PM=0D=0A=0D=0AStephen,=
=0D=0A=0D=0AI’m afraid that simply isn’t so.=0D=0A=0D=0AIf the query is app=
lying the functions to tables within the Access=0D=0Adatabase, it really do=
esn’t matter whether the DAO library is=0D=0Areferenced or not. The functio=
ns aren’t part of any referenced library.=0D=0AThe functions are implemente=
d in the Microsoft Jet engine and/or in=0D=0Athe Access executable itself.=
=0D=0A=0D=0AMichael S. Meyers-Jouan=0D=0A=0D=0A---------------Original Mess=
age---------------=0D=0AFrom: Stephen Evans=0D=0ASent: Saturday, December 1=
1, 2010 1:54 PM=0D=0ASubject: Unknown function name in query expression=
=0D=0A=0D=0AIf DAO is not referenced you will certainly get theses errors
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any other MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.
---- File information -----------
File: DEFAULT.BMP
Date: 21 Sep 2001, 14:59
Size: 358 bytes.
Type: Unknown
Stephen,
I’m afraid that simply isn’t so.
If the query is applying the functions to tables within the Access database, it really doesn’t matter whether the DAO library is referenced or not. The functions aren’t part of any referenced library. The functions are implemented in the Microsoft Jet engine and/or in the Access executable itself.
Michael S. Meyers-Jouan
If DAO is not referenced you will certainly get theses errors
If corruption is a possibility, don’t do any type of “repair” until you save out (export) everything you can to a new database.
After all saved out, you can proceed with recovery operations.
Kalman Toth, SQL Server Training & Business Intelligence Training
SQL 2008 GRAND SLAM: sqlusa.com - sqlusa Resources and Information.
//////////////////////////////////////////////
Gene,
I doubt that you “delete(d) the module that has all of the functions that are used by Access” - that functionality is part of the basic Access application. However, you may have corrupted your database.
Before you do anything else, use the Database Utilities to “Compact and Repair” your database. If you still have problems after that, you may need to create a new database, and import the components of the existing database to the new one. But start with the “Compact and Repair.”
Michael S. Meyers-Jouan
Can you go back to a backup or the copy you made before you tried to teach yourself VBA.?
If not can you create a brand new access databse and import your objects in ie tables,queries, forms, reports etc?
You may have removed a reference to a library. So you could open a VBA module and check the references (Tools menu item)
Mary