Close a form with code - URGENT! - InfoPath Dev
in

InfoPath Dev

Use our Google Custom Search for best site search results.

Close a form with code - URGENT!

Last post 07-21-2005 10:48 PM by SherazAttari. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-21-2005 09:48 AM

    Close a form with code - URGENT!

    Please respond ASAP!!

    I have a form that when you click submit:
    It is submitted to a sharepoint library (formA)
    a new form is opened (formB)
    the form code runs (formA)
    then it closes (formA)

    i tried putting the Close in a rule, but it ran the rules before it ran the custom code. so i tried putting this at the bottom of my code on FormA:

    Application.XDocuments.Close(XDocument)

    This seems to work fine, but then on the new form that is opened...the rules do not run when i press submit (i think the code does though)

    is there a different way to close FormA using code? a way that will make all this work like it is supposed to?
  • 07-21-2005 11:12 AM In reply to

    Re: Close a form with code - URGENT!

    ok, i found that this might work:
    Application.XDocuments.Close(0)

    but if i hard code that into the form code...maybe it will close the first form, but what happens when it tries to close the second form after you press submit? then wouldnt it have to be (1) ?
  • 07-21-2005 01:53 PM In reply to

    Re: Close a form with code - URGENT!

    Hi Matrix,
    This might work for you to close the current window
    XDocument.View.Window.Close(true);

    Agni
    InfoPath Dev India
  • 07-21-2005 10:48 PM In reply to

    Re: Close a form with code - URGENT!

    Try,

    thisApplication.ActiveWindow.Close(true);

    -Attari-
Page 1 of 1 (4 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.