Submitting an InfoPath form to an Access Database

C

c9ola

I have an InfoPath form (survey) that I will email out to some users. Once
they hit the submit button, which is coded to close the form, the user is
left in InfoPath. Is there a way to close out of InfoPath as well? Thanks!
 
K

Kalyan G Reddy MVP (GGK Tech)

Hello

Did You mean to say if you have selected Notify me of replies, then the
Infopath closed out?
 
C

c9ola

No, sorry. My second post had nothing to do with the first. I forgot to
select 'Notify me of replies' and I wanted to be notified if someone replied.
The only way I could figure out how to do that was to make another post.
Sorry for the confustion.

I still need to know if there is a way to programatically close InfoPath
when a form is submitted to an Access Database. Thank you.
 
K

K.Ramana Reddy(GGK Tech)

Hi,

You can close the form after submitting by using below code.
thisXDocument.View.Window.Close(true); (this is in c#)
XDocument.View.Window.Close(true); (this is in Jscript)
 
C

c9ola

Thank you for this information . . . I believe it's just what I'm looking
for. However, I don't know where to put it. (Sorry . . . this is new to
me.) The submit button I have on the form has a 'Define Action Paramters'
component on it, but I don't see anywhere to put code. I looked at the
Microsoft Script Editor and can't see the submit button object anywhere.
Just a little more direction please. Thank you so much!
 
C

c9ola

No. As I mentioned in my last post, I don't see anywhere to put code. It has
a 'Define Action Parameters' button with choices - but no place for code.
 
C

c9ola

I was just going over your reply again and realized you are referring to
closing the form.

You can close the form after submitting by using below code.
thisXDocument.View.Window.Close(true); (this is in c#)
XDocument.View.Window.Close(true); (this is in Jscript)

The 'Define Action Parameters' button that I'm using already handles closing
the form. I want to close InfoPath itself. Is there code for that, and
where does it go? Can the 'close' property of the form run a function that
closes InfoPath?
 

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