• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 259
  • Last Modified:

open a report from an external DB

I have 2 DB's one that is an mde and the other is mdb.  the mdb has a report that needs to be opened in design view. I'm looking a method that will open the mdb from within the mde and then open the rpt in design within the mdb print the report and then close the mdb.  as you probably realize, I need to do this because you can't open a report in design view under an mde.
0
SE081398
Asked:
SE081398
  • 3
  • 3
1 Solution
 
shanesuebsahakarnCommented:
Have a look here:
http://www.mvps.org/access/reports/rpt0012.htm

Just modify the .DoCmd.OpenReport line to open the report in design view and then do whatever you need with it.
0
 
SE081398Author Commented:
Let me rephrase my original question by answering yours.

this is what I have currently.

Set RptDB = OpenDatabase(GetDBPath & "IntRpt.mdb", False, False)
With RptDB
    DoCmd.OpenReport RptName, acViewDesign
    'varGroupLevel = CreateGroupLevel("qry invoices", "invoicedate", True, True)
End With

If thefield <> "" Then
    Create_Report_Cntl thefield 'create the controls to be added.
End If
If thegroup <> "" Then
    Create_Group thegroup, Total
End If

If thetitle <> "" Then
    With Reports(RptName)
        !rptlabel.Caption = thetitle
    End With
End If


this code is in my mde what I need to do is open the intrpt.mdb where the report is.  docmd looks for a report in the existing mde and can't find it and causes an error.  I need to be able to open the specified report within intrpt.mdb from within my mde, make sense?
0
 
shanesuebsahakarnCommented:
Look at the code in the link I gave you. It uses a With statement to operate the DoCmd statement in the external database, which is opened with <application object>.OpenCurrentDatabase()
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
SE081398Author Commented:
My sincerest applologies.  I'm stressed and didn't bother to investigate the link the first time.  I saw the docmd statement and thought you didn't understand my question.  Again I'm sorry.  Your link is perfect.

thank you.
0
 
shanesuebsahakarnCommented:
No probs, hope it helps you achieve what you need.
0
 
SE081398Author Commented:
Yes it has.  I've modified a bumnch of stuff but so far things are looking good.  However, during my extensive modification Access experienced a GPF and I lost all me changes :(:(  1 hour of great code down the crapper.

Thanks again for your help.

0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now