Solved

Copying a report from one Access file to another

Posted on 1999-01-12
4
153 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now