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