Open Report from Data Access Page

Lisad

Access Beginner
Local time
Yesterday, 22:04
Joined
Jan 26, 2005
Messages
31
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?
 

Users who are viewing this thread

Back
Top Bottom