# ReturnStatus Property (VersionUpgradeEvent Object)

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

expression.ReturnStatus

expression Required. Returns a reference to the VersionUpgradeEvent 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 OnVersionUpgrade event fails and the form is not opened. If set to True, the OnVersionUpgrade event is successful.

## Example

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

    function XDocument::OnVersionUpgrade(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