Solved

Copying a report from one Access file to another

Posted on 1999-01-12
4
158 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

691 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