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 2007

Tip: Looking for answers? Try searching our database.

Create a Submit and Print Button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Meg - 14 Jun 2007 18:24 GMT
I want a Submit and Print Button so that when the user Enters new data they
can click the button and it will Submit the data back to my Access Database
and then Print the new data in the Data Entry Form.  I have tried the
following:

You can use this code (vbscript) on the click event of your button:

    XDocument.Submit
    XDocument.Printout

** NOTE: This will require your form to be "Fully Trusted."

Also tried
             this.XDocument.Submit
             this .XDocument.Printout

It does not work either way and I get the message:  

A run-time error has occurred.
Do you want to debug?
The following error occurred:

‘this.XDocument’ is null or not an object       (or XDocument is null or not
an object)
File:script.js
Line:47

Maybe I am not putting it in the right place.  Can anyone help??

Thanks,

MEG
S.Y.M. Wong-A-Ton - 15 Jun 2007 09:30 GMT
Add an OnSubmitRequest event handler to your form and put the first two lines
you listed in it. Take a look at this article (section "Using Custom
Script"): http://msdn2.microsoft.com/en-us/library/aa168465(office.11).aspx
---
S.Y.M. Wong-A-Ton

> I want a Submit and Print Button so that when the user Enters new data they
> can click the button and it will Submit the data back to my Access Database
[quoted text clipped - 28 lines]
>
> MEG
 
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.