dbTalk Databases Forums  

Displaying MS Access reports

comp.database.ms-access comp.database.ms-access


Discuss Displaying MS Access reports in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Donald Wheeler
 
Posts: n/a

Default Displaying MS Access reports - 12-13-2004 , 11:01 AM






Hi all,

I have a critical problem - our client wants to be able to display reports
that they've made in MS Access over a web-based interface. I thought that
this would be straightforward but the following code *always* gives the '
Microsoft Access can't open the database because it is missing, or opened
exclusively by another user. ' error, regardless of whether an Access
instance is running or not (the path is correct).

---------------------------------

On Error Resume Next

Dim objAccess,filePath

Set objAccess = CreateObject("Access.Application")
filePath = Server.MapPath("commute_reporting.mdb")

objAccess.OpenCurrentDatabase filePath

If Err.Number=0 Then
objAccess.DoCmd.OpenReport "CarpoolReport", acViewPreview,
acReadOnly
objAccess.DoCmd.OutputTo 3, "CarpoolReport", "Snapshot Format
(*.snp)", "Carpool.snp"
objAccess.DoCmd.Quit 2
Else
Response.Write "Error Number - " & Err.Number & "<br />"
Response.Write "Error Source - " & Err.Source & "<br />"
Response.Write "Error Description - " & Err.Description & "<br />"
End If

objAccess.CloseCurrentDatabase
objAccess.Quit
Set objAccess = Nothing

On Error Goto 0

---------------------------------

The only non-scripting options that I've found have been extremely
expensive; has anyone else done this? Do you have any suggestions? I can't
find much if at all on this problem, other than make sure that the filename
is correct.

Thanks for your help!
Donald





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.