Please can someone help me with this. I have a Data Access Page that I have added a Command Button to. I want a report to open when this button is clicked on. So i've opened up MS Script Editor and have put the following in the onclick of the button.
<SCRIPT language=vbscript event=onclick for=OpenExecReport>
<!--
DoCmd.OpenReport "RPTExecDiary", acViewPreview
-->
</SCRIPT>
But I get a script error (Error - Object Required: 'DoCmd') when the button is clicked. What am I doing wrong?
<SCRIPT language=vbscript event=onclick for=OpenExecReport>
<!--
DoCmd.OpenReport "RPTExecDiary", acViewPreview
-->
</SCRIPT>
But I get a script error (Error - Object Required: 'DoCmd') when the button is clicked. What am I doing wrong?