Closing Infopath Form then trying to save with errors on form....

T

tonyeley

I have a form that accesses a SQL database only.

I fill in some fields but leave some mandatory fields blank.

I then click the X to close the form and it prompts 'do you wish to
submit the form?'

I click yes and it gives me the error saying cannot submit as there are
errors on the form.

I then click ok and the form closes so I have lost all my changes.

Any ideas?
 
G

Greg Collins [InfoPath MVP]

That's a tough one. I'm not so sure that you have any control over that action. The application "X" button does what it wants. Perhaps you can add a close button in your form that would give you more control.

--
Greg Collins [InfoPath MVP]
Visit http://www.BrainTrove.com
Visit http://www.InfoPathDev.com


I have a form that accesses a SQL database only.

I fill in some fields but leave some mandatory fields blank.

I then click the X to close the form and it prompts 'do you wish to
submit the form?'

I click yes and it gives me the error saying cannot submit as there are
errors on the form.

I then click ok and the form closes so I have lost all my changes.

Any ideas?
 
T

Tony Eley

Greg

Thanks for your reply. I thought about adding a close button but it's
obviously not the best solution.

Do you (or anyone) know if there is a close event in 2007?

Thanks
Tony
 
G

Greg Collins [InfoPath MVP]

I don't personally know. It seems, though, if you are using managed code, and set your form to full trust (which you might not want to do) that you should be able to tap into that event somehow. Someone else will have to help you figure out how that would work.

--
Greg Collins [InfoPath MVP]
Visit http://www.BrainTrove.com
Visit http://www.InfoPathDev.com


Greg

Thanks for your reply. I thought about adding a close button but it's
obviously not the best solution.

Do you (or anyone) know if there is a close event in 2007?

Thanks
Tony
 
T

Tony Eley

I am using managed code and have the form set to full trust so can
anyone help me tap into this event please?

Thanks
 
G

Greg Collins [InfoPath MVP]

It might be helpful to also post this question in the C# and WindowsForms newsgroups as it seems to pertain more to those scenarios than specifically to InfoPath.

If you receive an answer, please post back here as this question has been raised numerous times, and I'm sure there are many who would love to know how to do this.

--
Greg Collins [InfoPath MVP]
Visit http://www.BrainTrove.com
Visit http://www.InfoPathDev.com


I am using managed code and have the form set to full trust so can
anyone help me tap into this event please?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top