Solved

Copying a report from one Access file to another

Posted on 1999-01-12
4
155 Views
Last Modified: 2010-05-18
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?
0
Comment
Question by:clifABB
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

by:mcix
ID: 1455769
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
 
LVL 6

Author Comment

by:clifABB
ID: 1455770
mcix:
That did it.

Thanks, please resubmit for points.
0
 
LVL 4

Accepted Solution

by:
mcix earned 50 total points
ID: 1455771
Cool
0
 
LVL 6

Author Comment

by:clifABB
ID: 1455772
Thanks again.
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question