Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting individual saved reports.

Status
Not open for further replies.

nobeltlp

Programmer
Aug 22, 2005
6
0
0
US
Is it possible to select a saved report from
Containers.Reports.documents

Using the following I can list the entire contence
in a form list box, but there are only seven reports I want to list.

I have tried veriations of If and For each with Like
"*.XXX", but I always recieve;"expression not supported with type object."


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
 
How about posting the code you get the error with?

Yes, you can spin through all of the report names.

What are you trying to include or exclude?

"Have a great day today and a better day tomorrow!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top