Snapshot Viewer to show report in IE browser

K

Ketaki

I'm trying to run the following code to be able to show an
MS Access report in the client's browser, but I get an
error message 'MSAccess (0x800A09B7) The Object Type
argument for the action or method is blank or invalid'.

<HTML><HEAD>
<TITLE>trial.asp</TITLE>
<body bgcolor="#FFFFFF">
</HEAD>
<%
Dim strSnapFile
strSnapFile = "operReport.snp"
Dim objAccess
Set objAccess = Server.CreateObject("Access.Application")
objAccess.Visible = False
objAccess.OpenCurrentDatabase Server.MapPath("Reports-EMIS-
PARTs.mdb")

With objAccess.DoCmd
..OpenReport "SSbyPMAnnual",2
..OutputTo acOutputReport,,"Snapshot Format",Server.MapPath
(".") & "\snapfiles\" & strSnapFile
..Close
End With

objAccess.Quit acQuitSaveNone
Set objAccess = Nothing
%>

<OBJECT ID="SnapshotViewer" WIDTH=640 HEIGHT=480
CLASSID="CLSID:F0E42D60-368C-11D0-AD81-00A0C90DC8D9">
<PARAM NAME="_ExtentX" VALUE="16722">
<PARAM NAME="_ExtentY" VALUE="11774">
<PARAM NAME="_Version" VALUE="65536">
<PARAM NAME="SnapshotPath" VALUE="snapfiles/<%
strSnapFile%>">
<PARAM NAME="Zoom" VALUE="0">
<PARAM NAME="AllowContextMenu" VALUE="-1">
<PARAM NAME="ShowNavigationButtons" VALUE="-1">
</OBJECT>

</BODY>
</HTML>
 

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

Similar Threads


Top