Hi Paul,
If you are merely trying to "force" close the form regardless of whether
the user has saved their data, you can use the following on a button's
click event:
- VBScript:
Dim objXDoc
Set objXDoc = Application.XDocuments(0)
Application.XDocuments.Close objXDoc
Set objXDoc = Nothing
- JScript:
var objXDoc = Application.XDocuments(0);
Application.XDocuments.Close(objXDoc);
objXDoc = null;
Keep in mind though, this does not save the data. If you want to "force" a
save in here as well, you will need to call the "Save" or "SaveAs" method.
Best regards,
Scott L. Heim
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.