Automate remote report

X

xzzy

I need to automate a report in a different database.

Dim RPT as Report

Set MyDB = wrkJet.OpenDatabase(Application.CurrentProject.Path &
"\Mydb.mdb", True, False)

For i = 0 To MyDB.Containers(5).Documents.Count - 1
If MyDB.Containers(5).Documents(i).Name = "MyReport" Then



'the following line works
DoCmd.OpenReport MyDB.Containers(5).Documents(i).Name,
acViewDesign

'I need to set the object RPT to the remote report that is now in design
mode.
'The following line of code does not work:
Set rpt = MyDB.Containers(5).Documents(i).Properties(0).Name



End If
Next i

Thank you for your help
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top