Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / June 2006

Tip: Looking for answers? Try searching our database.

How to close a Form from onload event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anoop - 02 Jun 2006 07:11 GMT
I am trying to close the form after validation in the onload event.
I tried both Windows.Close and XDocument.Close() . neither one works.

Any other alternative? My requirement is to prevent user from working with
the form if the validation fails.

Thanks in advance.
Anoop
Kalyan Reddy - 02 Jun 2006 09:20 GMT
Hi Anoop,

Try this
thisApplication.XDocuments.Close(obj);

Signature

Kalyan Reddy
Visit http://www.autonomysystems.com

> I am trying to close the form after validation in the onload event.
> I tried both Windows.Close and XDocument.Close() . neither one works.
[quoted text clipped - 4 lines]
> Thanks in advance.
> Anoop
Anoop - 02 Jun 2006 10:28 GMT
I have already tried thisApplication.XDocuments.Close and Window.Close()

Is there anyway I can do some validations and the restrict the user from
using the form. other than in the onload event , if closing form is not
possible from onload?

regards
Anoop

> Hi Anoop,
>
[quoted text clipped - 9 lines]
> > Thanks in advance.
> > Anoop
Kalyan Reddy - 02 Jun 2006 11:13 GMT
Hi Anoop,

Do you want to close the form with validations in Onload event??
thisApplication.XDocuments.Close( ) will not allow the form to be closed
with validations on.

One way is collect all errors and delete them with this method
XDocument.Errors.DeleteAll();
and then use
thisApplication.XDocuments.Close

Hope I understood you correctly.
Signature

Kalyan Reddy
Visit http://www.autonomysystems.com

> I have already tried thisApplication.XDocuments.Close and Window.Close()
>
[quoted text clipped - 18 lines]
> > > Thanks in advance.
> > > Anoop
Anoop - 02 Jun 2006 14:10 GMT
Kalyan,

    I am not talking about form validations. I check for the user and want
to restrict for a particular user. So I need just a method to close the form
in onload event.

Anoop

> Hi Anoop,
>
[quoted text clipped - 31 lines]
> > > > Thanks in advance.
> > > > Anoop
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.