unknown function name in query expression

G

Guest

I'm getting an error message when running a query that uses the NOW()
function. The error message is "unknown function name in query expression".
This stopped working today for all queries and reports that have the NOW()
function in them. Is there a bug in Access 2000 that causes this? Please
help.

Thank you.
 
J

Jeff Conrad

It is a References problem. The arch-nemesis of Access is missing references.

To fix the References problem follow these steps:
- Open any module in Design view.
- On the Tools menu, click References.
- At least one Reference should say "Missing". WRITE down the one(s) missing.
- Click to clear the check box for the type library or object library marked as "Missing:."
- Close the References Window box.
- Open the References Window back up. Hopefully, nothing should say Missing this time.
- Now go find that library/project(s) in the list that was missing.
- If more than one were missing, find the others and check them as well.
- Close the References box again.
- Now re-compile again. Debug--Compile.
- Hopefully you should not see any more compile errors.

If you'd like to read more about References, here's more info than you could possibly ever want to
know:

http://members.rogers.com/douglas.j.steele/AccessReferenceErrors.html

http://members.iinet.net.au/~allenbrowne/ser-38.html

http://www.trigeminal.com/usenet/usenet026.asp

http://www.papwalker.com/dllhell/index-page2.html

ACC2000: How Access 2000 Resolves Visual Basic for Applications References
http://support.microsoft.com/?id=248941

ACC2000: How to Resolve Reference Issues in an Access Database
http://support.microsoft.com/?id=310803

ACC2002: References That You Must Set When You Work with Microsoft Access
http://support.microsoft.com/?id=283115

ACC97: References That You Must Set When You Work with Microsoft Access
http://support.microsoft.com/?id=175484

ACC: VBA Functions Break in Database with Missing References
http://support.microsoft.com/?id=160870
 
J

John Vinson

I'm getting an error message when running a query that uses the NOW()
function. The error message is "unknown function name in query expression".
This stopped working today for all queries and reports that have the NOW()
function in them. Is there a bug in Access 2000 that causes this? Please
help.

Thank you.

This appears to be the very common References bug. Open any
module in design view, or open the VBA editor by typing
Ctrl-G. Select Tools... References from the menu. One of the
..DLL files required by Access will probably be marked
MISSING. Uncheck it, recheck it, close and open Access.

If none are MISSING, check any reference; close and open
Access; then uncheck it again. This will force Access to
relink the libraries.

John W. Vinson[MVP]
 
G

Guest

My attempts at this have been unsuccessful: I get an Invalid data format
when I try to open the module. Then when going to Tools References and
unchecking a reference, I get the message that it can't perform the requested
operation. This happens if I select one or unselect one.
 
J

Jeff Conrad

Hi Larry,

Humm...this does not sound good.
Does the error message occur when you open any module, or just the one?
You might have some VBA corruption in your database.
Make a backup copy of this database before doing anything else.
Try importing all objects into a new database container, compile, and then compact the new database.
Do you still get the error message when opening that (or any) module?

We may need to decompile your database, but try the above first.
 
J

Jeff Conrad

Ouch, that really does not sound good Lynn!
Well hopefully it won't be that bad for Larry.
We'll just try one step at a time and use that as a last resort.
Thanks for the info.
 
J

Jeff Conrad

Whew!
That is good to hear Larry!
Thanks for the update.

Remember, always follow the path to the Light Side:
"Keep good backups"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top