# ReturnStatus Property (DocActionEvent Object)

Sets or retrieves a Boolean value indicating the return status of the OnClick event.

expression.ReturnStatus

expression Required. Returns a reference to the DocActionEvent object.

## Security Level

2: Can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.

## Remarks

If the ReturnStatus property is set to False, the OnClick event fails. If set to True, the OnClick event is successful. The default value is True.

Note Setting the ReturnStatus property to false will cause a message box to be displayed which indicates what has failed.

## Example

In the following example, the ReturnStatus property of the DocActionEvent object is used to indicate that the OnClick event was not successful:

    function DocActionEventCancel::OnClick(eventObj)
    {
       // Cancel the event.
       eventObj.ReturnStatus = false;
    }

©2003-2004 Microsoft Corporation. All rights reserved. Permission to copy, display and distribute this document is available at: http://msdn.microsoft.com/library/en-us/odcXMLRef/html/odcXMLRefLegalNotice.asp