Is it possible to select a saved report from
Containers.Reports.documents
Using the following I can list the entire contents
in a form list box, but there are only seven reports I want to list.
Private Sub Form_Load()
Dim MyRep As Document, Mydb As Database
Set Mydb = CurrentDb
Me!Replist.RowSource = ""
For Each MyRep In Mydb.Containers("Reports").Documents
Me!Replist.RowSource = Me!Replist.RowSource & MyRep.Name & ";"
Next MyRep
Me!Pgto.Enabled = False
Me!Pgfrom.Enabled = False
End Sub
I have tried veriations of If and For each with Like
"*.XXX", but I always recieve;"expression not supported with type object."
Containers.Reports.documents
Using the following I can list the entire contents
in a form list box, but there are only seven reports I want to list.
Private Sub Form_Load()
Dim MyRep As Document, Mydb As Database
Set Mydb = CurrentDb
Me!Replist.RowSource = ""
For Each MyRep In Mydb.Containers("Reports").Documents
Me!Replist.RowSource = Me!Replist.RowSource & MyRep.Name & ";"
Next MyRep
Me!Pgto.Enabled = False
Me!Pgfrom.Enabled = False
End Sub
I have tried veriations of If and For each with Like
"*.XXX", but I always recieve;"expression not supported with type object."