Hi Kim,
If you don't mind writing a little code, you can accomplish what you need:
- Right-click on your button and choose Properties
- Click Edit Form Code - you should see code similar to the following:
Sub CTRL5_7_OnClick(eventObj)
'Write your code here
End Sub
- Replace the line "Write your code here" with the following:
XDocument.Submit
Application.ActiveWindow.Close true
- Save and test
** NOTE: The above code is VBScript - if you are using JScript, change
those lines to the following:
XDocument.Submit();
Application.ActiveWindow.Close(true);
One last item - if you want to display a message to the user before closing
InfoPath, add the following between the 2 lines noted above:
- VBScript:
XDocument.UI.Alert "InfoPath will now close!"
- JScript:
XDocument.UI.Alert("InfoPath will now close!");
I hope this helps!
Take care,
Scott L. Heim
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.