Copying Access reports

M

Martin Walke

Hi all,

Is there any way, using vb6, to copy a report created in access from one
database to another? Are there objects exposed that i can get to?

TIA
Martin
 
D

Douglas J. Steele

Instantiate an instance of Access and use the TransferDatabase method to
transfer the report. The following should copy a report named "Report1" from
file C:\Folder\File1.mdb to C:\Folder\File2.mdb:

Dim objAccess As Access.Application

Set objAccess = New Access.Application
objAccess.OpenCurrentDatabase "C:\Folder\File1.mdb"
objAccessDoCmd.TransferDatabase acExport, _
"Microsoft Access", _
"C:\Folder\Filed2.mdb", acReport, "Report1", _
"Report1"
objAccess.CloseCurrentDatabase
Set objAccess = Nothing
 
M

Martin Walke

True! Ok... I'm cheating here. I'm actually creating a database and tables
using ASP. The DB will get emailed to the user who does have Access but the
server doesn't. I'm trying to eliminate the human step of copying and
pasting the report from a master DB.

Martin

"Pieter Wijnen"
 
P

Pieter Wijnen

thought as much

Pieter

Martin Walke said:
True! Ok... I'm cheating here. I'm actually creating a database and tables
using ASP. The DB will get emailed to the user who does have Access but
the server doesn't. I'm trying to eliminate the human step of copying and
pasting the report from a master DB.

Martin

"Pieter Wijnen"
 
Top