I changed =Left(Command(),3) to a Function =GetCommand3() and put Left(Command(),3) in VBA code and it works OK

To make your system more resistant to malicious attacks, and at the same time make it possible for older applications to keep running, the operation of Sandbox mode changed in Jet 4.0 Service Pack 8 so that Sandbox mode is completely under your control.

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

0 Sandbox mode is disabled at all times.
1 Sandbox mode is used for Access applications, but not for non-Access Applications.
2 Sandbox mode is used for non-Access applications, but not for Access Applications. This is the default value.
3 Sandbox mode is used at all times.

1. All Access 2000+ developers should upgrade their version of jet 4 to SP8 most current version 4.0.8618.0

2. Access 2000 & 2002 default install SandboxMode = 2

3. Access 2003 default install SandboxMode = 3

4. All Access 2000+ developers should Set HKEY_LOCAL_MACHINESoftwareMicrosoftJet4.0enginesSa ndboxMode = 3 so all land mines will fire while developing.