VBA Script from Win2000 not working in XP

G

Guest

We have a critical application written in Access 2000 VBA script running on
Windows 2000 machines. The same application does not run on Windows XP
machines. I have set the sandbox registry entry to 3 but Access does not
recogize the script. How can I configure this application or adjust settings
in XP so that it will run in Access 2003 on machines using Windows XP, sp2?
 
G

Guest

I have set the sandbox registry entry to 3 but Access does not
recogize the script.

Excellent! As long as Jet 4.0 SP-8 is installed, this is the setting that,
when you change it to 0 or 2, you will look like an instant genius to your
boss, who finds that unsafe expressions are no longer blocked. Queries and
properties that use unsafe expressions will now work, but VBA code that uses
unsafe expressions isn't affected by sandbox mode, no matter which sandbox
mode setting is applied.

In other words, VBA code works the same in every sandbox mode, so if VBA
code isn't running properly, then changing the sandbox mode won't fix it.
For more information, please see the following Web page:

http://support.microsoft.com/default.aspx?id=294698

HTH.
Gunny

See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips.

(Please remove ZERO_SPAM from my reply E-mail address so that a message will
be forwarded to me.)
- - -
If my answer has helped you, please sign in and answer yes to the question
"Did this post answer your question?" at the bottom of the message, which
adds your question and the answers to the database of answers. Remember that
questions answered the quickest are often from those who have a history of
rewarding the contributors who have taken the time to answer questions
correctly.
 
G

Guest

That's the same article I used in the first place. The script is not running
at all. It's as if access didn't know it had the script. And now when I look
in the registry, the sandbox entry is no longer there.

Is there any other security feature in XP that would be causing Access to
ignore script?
 
T

TC

You say the application "does not run" and the VBA script "does not
run". What do you mean by "does not run"? When you double-click the
database file, exactly what happens?

TC
 
G

Guest

When the data base is opened, the correct form loads, but the VBA script that
should fire on loading hangs on a statement using the Date() function with
the error that it 'cannot find project or library'.

References are added for:
Visual Basic for Applications
Microsoft Access 11.0 Object Library
OLE Automation
Microsoft ActiveX Data Objects 2.1 Library
Microsoft DAO 3.6 Object Library
MISSING: shappmgr 1.0 Type Library
Microsoft Scriptiong Runtime

Maybe the MISSING library is my problem. I did a full install of Office
2003. Is there some other library that replaces shappmgr 1.0 Type Library?

On the Win2000 machine, that library is checked and is not marked MISSING.

I have tried both settings zero and 3 in the sandbox registry setting and
neither does any good. I don't believe that's the issue.

Are there any instructions anywhere for porting Access applications from
Win2000 to XP and from Office 2000 to Office 2003?
 
D

Douglas J. Steele

Yes, the Missing reference is definitely a problem. I don't believe shappmgr
is a part of Office, though.

On a machine where it isn't missing, click on that reference and see the
actual file to which it refers at the bottom of the dialog. What file is it?
 
G

Guest

C:\WINNT\System32\appwz.cpl

Is there a good way to find out what it does?

I removed the reference from the version on the XP machine and now the app
appears to work. It'll need some more testing to ensure nothing's missing.
 
T

TC

Um, when code fails with an error, your first post really should say
exactly what the error was. This saves everyone faffing-around, trying
to guess what has actually happened!

Cheers,
TC
 
T

TC

PS. I recently had the experience of converting a database from A97 to
A2k*, and finding that the converted databases had an extra reference
that I had not used in the original db, & did not want in the new one!
This caused all of the new ones to fail. I actually had to bin 100
expensively-labelled CDs, which I had created before I realized this.

So now I make it a rule, whenever I convert a database from one version
of Access to another, I immediately check the references in the
converted db, to make sure that nothing unexpected has occurred.

HTH,
TC
 
D

Douglas J. Steele

If the application compiles cleanly without the reference, odds are you
weren't actually using it.

One way to get some idea of what a particular reference is for is to open
the Object Browser (F2 when you're in the VB Editor). Select the appropriate
library in the top left combobox, then look at the details in the bottom.
That hopefully will give you some idea.
 

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