Copying a report from one Access file to another

Using VB (5) code, I need to copy an Access report from one file to another.  Is there anyway to do this?  If so, how?
LVL 6
clifABBAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
mcixConnect With a Mentor Commented:
Cool
0
 
mcixCommented:
There are a couple of ways to do this...

The simplest (From VB) is to create a reference to Access using Project References.  

Something like this:

Dim x As Access.Application
   
Set x = GetObject(, "Access.Application")
   
x.DoCmd.CopyObject "DestinationDBFullPath", "NameInDestination", acReport, "SOURCEREPORT"
   
Set x = Nothing

0
 
clifABBAuthor Commented:
mcix:
That did it.

Thanks, please resubmit for points.
0
 
clifABBAuthor Commented:
Thanks again.
0
All Courses

From novice to tech pro — start learning today.