From: Allison on
Migrated from Access 97 to Access 2007. Files in trusted location. Macros
run but VB code will NOT run. Please help...
From: Arvin Meyer [MVP] on
Make sure it isn't sandboxed. Here's something from a Microsoft article that
may help:

Close all instances of Access that are running on the computer for which you
want to disable sandbox mode.
Do one of the following:
In Windows Vista
Click the Start button , point to All Programs, click Accessories, and then
click Run.

In the Open box, type regedit and then press ENTER.
The Registry Editor starts.

Expand the HKEY_LOCAL_MACHINE folder and navigate to the following registry
key:
\Software\Microsoft\Office\12.0\Access Connectivity Engine\Engines

In the right pane of the registry editor, under Name, double-click
SandboxMode.
The Edit DWORD Value dialog box appears.

In the Value Data field, change the value from 3 to 2, and then click OK.
Close the Registry Editor.
In Microsoft Windows XP or Microsoft Windows Server 2003
On the taskbar click Start, and then click Run.
In the Open box, type regedit and then press ENTER.
The Registry Editor starts.

Expand the HKEY_LOCAL_MACHINE folder and navigate to the following registry
key:
\Software\Microsoft\Office\12.0\Access Connectivity Engine\Engines

In the right pane of the registry editor, under Name, double-click
SandboxMode.
The Edit DWORD Value dialog box appears.

In the Value Data field, change the value from 3 to 2, and then click OK.
Close the Registry Editor.
Important Remember that if you do not first enable the content in the
database, Access disables any unsafe expressions regardless of whether you
change this registry setting.

You can set the registry value to the following values, with 0 (zero) being
the most permissive and 3 being the least permissive.

Setting Description
0 Sandbox mode is disabled at all times.
1 Sandbox mode is used for Access, but not for non-Access programs.
2 Sandbox mode is used for non-Access programs, but not for Access.
3 Sandbox mode is used at all times. This is the default value, set when you
install Access.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com


"Allison" <Allison(a)discussions.microsoft.com> wrote in message
news:268FA2D0-0028-4DE5-8CD5-1B9316AB0785(a)microsoft.com...
> Migrated from Access 97 to Access 2007. Files in trusted location.
> Macros
> run but VB code will NOT run. Please help...