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
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