Access 2003 switchboard

P

philster

I have an access 2k3 app that I distribute in runtime. Whne I install it on
a machine with windows 2000 Pro (SP3) when I click on any switchboard item, I
get the following message:

"The expression OnClick you entered as the event property setting produced
the following error: the expression you entered has a function name that
microsoft access can't find" The onClick function is "=HandleButtonClick(1)"

Any ides on what the problem is?

TIA

Phil
 
A

Allen Browne

As you probably know, HandleButtonClick() is part of the code generated by
the switchboard wizard. The fact that it fails suggests that there is a
problem with the database. That could be a Name AutoCorrect fault (failure
to recognise names), or it could be a compilation problem that a Decompile
would fix (since the A2003 binary is different from the A2000 binary.)

Suggested sequence:
1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact

3. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access, and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.
 
P

philster

Alllen,

Thank you for your detailed resonse. Unfortunately, this did not reslove
my issue. I found MS article 827490 which describes a similar problem if
access 2003 runtime is installed and then removed. This is in reference to
access 2002. This is a test machine that Installed the app on. In order to
install the next version, I had to remove the first installation. Since
then, subsequent installations produce the error. The test machine did not
have a previos version of Access installed - just the 2003 RT.

Thanks,
Phil
 
A

Allen Browne

Are you certain there are no broken references, or other issues with that
machine?

If not, you could export the form with the undocumented SaveAsText, delete
it, compact, and then import it using LoadFromText. The syntax looks like
this:
SaveAsText acForm, "Form1", "C:\Form1.txt"
LoadFromText acForm, "Form1", "C:\Form1.txt"
No guarantees.

If that does not solve it either, could it have to do with permissions?
Sandbox mode? Local computer administrator?

Not sure what else to suggest.
 
P

philster

Allen,

You guessed it this time!! Thanks!! I had created a registry entry for
sandboxmode = 3 to surpress some dialogue boxes for Win XP . This causes the
error in Win 2K. Good news is that with the registry entry removed I don't
get the dialogues in Win 2K.

Phil
 

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