The expression you entered has a function name that DB can't find

M

Ming

When users start our application, some users get "The expression you entered
has a function name that Database can't find." error.

Any idea about this? and how to debug it? We are using macro autoExec()
which calls autoExec2(). I loaded some status info to the status bar when
macro starts. When the error occurs, the status bar has no info. It looks
like the problem starts before macro runs.

P.S. I have looked at the references, they seems OK. The error is not
generated on all Pcs.
 
K

Ken Snell \(MVP\)

Most likely you have a references problem. Common symptom is when VBA
functions are not recognized.

Try following these steps (from a post by Douglas Steele, MVP):

If any of the database's references are messed up on a PC -- you can get
that error.

Try following these steps (from a post by Douglas Steele, MVP):

This can be caused by differences in either the location or file version of
certain files between the machine where the application was developed, and
where it's being run (or the file missing completely from the target
machine). Such differences are common when new software is installed.

On the machine(s) where it's not working, open any code module (or open the
Debug Window, using Ctrl-G, provided you haven't selected the "keep debug
window on top" option). Select Tools | References from the menu bar. Examine
all of the selected references.

If any of the selected references have "MISSING:" in front of them, unselect
them, and back out of the dialog. If you really need the reference(s) you
just unselected (you can tell by doing a Compile All Modules), go back in
and reselect them.

If none have "MISSING:", select an additional reference at random, back out
of the dialog, then go back in and unselect the reference you just added. If
that doesn't solve the problem, try to unselect as many of the selected
references as you can (Access may not let you unselect them all), back out
of the dialog, then go back in and reselect the references you just
unselected. (NOTE: write down what the references are before you delete
them, because they'll be in a different order when you go back in)

For far more than you could ever want to know about this problem, check out
http://www.accessmvp.com/djsteele/AccessReferenceErrors.html
 
E

Eve

I have two stand-alone databases. In form design view,in either database,
clicking on the command button in the toolbox generates the same message:
"The expression you entered has a function name that (the database) can't
find". When I set up a new, test database, the same thing happens. Although I
have only just begun to learn VBA, and, as such, have very little
understanding of it, I managed to do what was suggested re the MISSING
references - to no avail. I am using Access 2000 with Windows XP Pro. I have
tried both repairing, and reinstalling Access. I regularly update all the
software.

Eve
 
K

Ken Snell \(MVP\)

Can you post the code that is causing the problem? Perhaps we then can debug
it with you.
 
E

Eve

Thank you for your reply, Ken. With regard to code - I don't know how to
write it yet. I have just started Chapter 1 of my VBA book, so I currently
don't understand much (most?) of the terminology. Anything done on my forms
has been via the wizards. On one, old database, I have a form with four
buttons labelled: telephone, email, availability and personnel. The second,
recent database has a form with no buttons at all. It was only when I clicked
on the Command Button in the toolbox in order to put a button on the form
that I realized that I had a problem. That was when I checked out the old
database - which works - I just can't add any new buttons to it or to any
other test databases.

Eve
 
K

Ken Snell \(MVP\)

Might be a problem with the wizard not being registered correctly. Try
re-registering this file:
Accwiz.dll

To re-register a DLL file,

1) Locate it (usually all these are in the Windows\System32 or
WINNT\System32 folder.

2) Locate the file regsvr32.exe.

3) Drag the DLL file's icon onto the regsvr32.exe icon.

Or run from Start | Run window (example):
Regsvr32 "path\msexcl40.DLL"

etc.


If this doesn't fix the problem, you may need to run a repair on your Office
installation.
 
E

Eve

Ken, accwiz.dll was not in Windows/System32. I found it in Program
Files/Microsoft Office/Office and dragged it on to the regsvr32.exe icon as
you suggested. Despite rebooting and reinstalling Office - still no luck. I
did notice that in System 32 there is a regwiz.exe and a regwizc.dll, as well
as a regsvr32.exe and a regsvc.dll. I don't know if the letter 'c' has any
significance. Any other ideas you might have will be greatly appreciated!

Eve
 
K

Ken Snell \(MVP\)

You found the correct acccwiz.dll file. It indeed is in Program Files area.
The steps that I'd posted are generic.

regsvr32.exe is the correct file (program) to use for reregistering a dll
file.

Did you try repairing the Office installation (Control Panel | Add/Remove
Programs)?
 
E

Eve

Yes, first I tried repairing Office, and when that didn't work, I reinstalled
Office.

Eve
 
E

Eve

There was an error in trying to post this reply, so I'm trying again. It may
turn up twice. Yes - I initially tried repairing Office and when that didn't
work, I reinstalled it.

Eve
 
K

Ken Snell \(MVP\)

I do not have other suggestions. You should contact Microsoft Product
Support about this weird error.
 
E

Eve

OK, Ken. Many thanks for trying to help.
Eve

Ken Snell (MVP) said:
I do not have other suggestions. You should contact Microsoft Product
Support about this weird error.
 
E

Eve

For anyone else with the same problem, I found that reformatting the computer
sorted things out.

Eve
 

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