Copying Access reports

  • Thread starter Thread starter Martin Walke
  • Start date Start date
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
 
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
 
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"
 
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"
 

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

Back
Top