Functions and properties in Access 2007 blocked by sandbox mode

This article provides reference information about the functions and properties that sandbox mode allows and blocks in Microsoft Office Access 2007. Note that Office Access 2007 allows several new functions to run in sandbox mode, including MonthName and StrReverse, and it now blocks several more functions, including Assistance, ExportNavigationPane, and LoadCustomUI. As you proceed, remember that you must trust (enable the content in) the database or place the database in a trusted location for the information in this article to be of use.

For more information about enabling the content in databases or placing databases in a trusted location, see the links in the See Also section.

In this article

Set sandbox mode to run unsafe expressions

Functions that you can use in sandbox mode

Functions that cause errors in sandbox mode

Functions blocked by sandbox mode

Properties blocked by sandbox mode

Set sandbox mode to run unsafe expressions

When you add an expression to a database, Access runs that expression in an operating environment called sandbox mode. Access does this for databases that were created in either Office Access 2007 or in earlier Access file formats. Access enables sandbox mode by default, and in turn, sandbox mode always disables unsafe expressions, even after you trust a database.

If you trust a database and you want to run an expression that sandbox mode disables, you can run that expression by changing a registry key that disables sandbox mode. Remember that you must first trust a database to follow the steps in this section.

This figure shows the process that you follow when deciding whether to run unsafe expressions.

The decision process for enabling or disabling sandbox mode

Caution      Incorrectly editing the registry may severely damage your operating system, requiring you to reinstall it. Microsoft cannot guarantee that problems resulting from editing the registry incorrectly can be resolved. Before editing the registry, back up any valuable data. For the most recent information about using and protecting your computer's registry, see Microsoft Windows Help.

If you are not familiar with the registry or you are not comfortable with changing registry keys yourself, contact someone who is or consider converting the database from the earlier version of Access to the Office Access 2007 file format. Also, you must have administrator permissions on the computer to change the registry values.

Change the registry key

Important: Following these steps allows unsafe expressions to run in all instances of Access for all users on the computer.

Do one of the following:

  • In Windows Vista    

    1. Click the Start button Button image , point to All Programs, click Accessories, and then click Run.

    2. In the Open box, type regedit and then press ENTER.

      The Registry Editor starts.

    3. Expand the HKEY_LOCAL_MACHINE folder and navigate to the following registry key:

      \Software\Microsoft\Office\12.0\Access Connectivity Engine\Engines

    4. In the right pane of the registry editor, under Name, double-click SandboxMode.

      The Edit DWORD Value dialog box appears.

    5. In the Value Data field, change the value from 3 to 2, and then click OK.

    6. Close the Registry Editor.

  • In Microsoft Windows XP or Microsoft Windows Server 2003    

    1. On the taskbar, click Start, and then click Run.

    2. In the Open box, type regedit and then press ENTER.

      The Registry Editor starts.

    3. Expand the HKEY_LOCAL_MACHINE folder and navigate to the following registry key:

      \Software\Microsoft\Office\12.0\Access Connectivity Engine\Engines

    4. In the right pane of the registry editor, under Name, double-click SandboxMode.

      The Edit DWORD Value dialog box appears.

    5. In the Value Data field, change the value from 3 to 2, and then click OK.

    6. Close the Registry Editor.

Important    Remember that if you do not first trust 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 Office Access 2007.

Top of Page

Functions that you can use in sandbox mode

The following table lists the functions that you can use in Access database engine queries when sandbox mode is enabled. Any functions that do not appear in the list are not available in sandbox mode.

Use the links in the See Also section for more help for the most commonly used functions.

Abs

Array

Asc

Ascb

Ascw

Atn

CBool

CByte

CCur

CDate

CDbl

Choose

Chr

Chr$

Chrb

Chrb$

Chrw

Chrw$

Cint

Clng

Cos

Csng

Cstr

Cvar

CVDate

CVErr

Date

Date$

DateAdd

DateDiff

DatePart

DateSerial

DateValue

Day

DDB

Error

Error$

Exp

Fix

Format

Format$

FormatCurrency

FormatDateTime

FormatNumber

FormatPercent

FV

Hex

Hex$

Hour

IIf

IMEStatus

InStr

InStrb

Int

IPmt

IRR

IsDate

IsEmpty

IsError

IsNull

IsNumeric

IsObject

LCase

LCase$

Left

Left$

Leftb

Leftb$

Len

Lenb

Log

LTrim

LTrim$

Mid

Mid$

Midb

Midb$

Minute

MIRR

Month

MonthName

Now

NPer

Npm

Oct

Oct$

Partition

Pmt

PPmt

PV

QBColor Function

Rate

Replace

RGB

Right

Right$

RightB

Rightb$

Rnd

Round

RTrim

RTrim$

Second

Sgn

Sgr

Sin

SLN

Space

Space$

Str

Str$

StrComp

StrConv

String

String$

StrReverse

Switch

SYD

Tan

Time

Time$

Timer

TimeSerial

TimeValue

Trim

Trim$

TypeName

UCase

UCase$

Val

VarType

Weekday

Year

Top of Page

Functions that cause errors in sandbox mode

The following Visual Basic for Applications (VBA) functions will cause an error when the functions are called from an expression in an Access database engine query, or when called from an Access property.

Use the links in the See Also section for more help for the most commonly used functions.

AppActivate

Beep

Calendar

CallByName

ChDir

ChDrive

Command

Command$

CreateObject

CurDir

CurDir$

DeleteSetting

DoEvents

Environ

Environ$

EOF

Err

FileAttr

FileCopy

FileDateTime

FileLen

FreeFile

GetAllSettings

GetAttr

GetObject

GetSetting

Input

Input$

InputB

InputB$

Kill

Load

Loc

LOF

Randomize

Reset

SaveSetting

Seek

SendKeys

SetAttr

Shell

Spc

Tab

Unload

UserForms

Width

Top of Page

Functions blocked by sandbox mode

Sandbox mode blocks the following Access functions when the functions are called from an expression in a query or from an Access property. An asterisk (*) after the function name indicates a function that is new in Office Access 2007.

Use the links in the See Also section for more help for the most commonly used functions.

AddAutoCorrect

AddToFavorites

ADOConnectString

AnswerWizard

Application

Assistant

Assistance*

AutoCorrect

AutomationSecurity*

BeginUndoable

CloseCurrentDatabase

CodeContextObject

CodeDb

COMAddIns

CommandBars

CompactRepair

ConvertAccessProject

CreateAccessProject

CreateAdditionalData

CreateControl

CreateControlEx

CreateDataAccessPage

CreateForm

CreateGroupLevel

CreateNewWorkgroupFile

CreateReport

DataAccessPages

DBEngine

DDEExecute

DDEInitiate

DDEPoke

DDERequest

DDESend

DDETerminate DDETerminateAll

DefaultWebOptions

DefaultWorkspaceClone

DelAutoCorrect

DeleteControl

DeleteReportControl

DoCmd

Echo

ExportCustomFixedFormat*

ExportNavigationPane*

ExportXML

FeatureInstall

FileDialog

FileSearch

FollowHyperlink

GetHiddenAttribute

ImportNavigationPane*

ImportXML

InsertText

LanguageSettings

LoadCustomUI*

LoadFromText

LoadPicture

Modules

NewAccessProject

NewCurrentDatabase

NewFileTaskPane

OpenAccessProject

OpenCurrentDatabase

Parent

ProductCode

Quit

References

RefreshDatabaseWindow

RefreshTitleBar

ReloadAddIns

ReplaceModule

Run

RunCommand

SaveAsText

SetDefaultWorkGroupFile

SetHiddenAttribute

SetOption

SetUndoRecording

SysCmd

TransformXML

VBE

Top of Page

Properties blocked by sandbox mode

In addition to the functions listed in the previous section, sandbox mode also blocks a number of object properties. The following table lists the objects and the blocked property or properties for each object.

Use the links in the See Also section for more help for the most commonly used properties.

Object

Blocked Property or Properties

BoundObjectFrame

Object

Combobox

Recordset

Control

Object

CurrentProject

AccessConnection, BaseConnectionString, CloseConnection, Connection, OpenConnection

CustomControl

Object

Form

Dynaset

Hyperlink

Add to favorites

Listbox

Recordset

ObjectFrame

Object

Report

Recordset

SmartTagAction

Execute

Screen

ActiveDataAccessPage

Top of Page

Share Facebook Facebook Twitter Twitter Email Email

Was this information helpful?

Great! Any other feedback?

How can we improve it?

Thank you for your feedback!

×