i want to write a routine using a do while loop that prints all the current reports in a database,
im wondering if there is a way to access reports by a number?
Sub AllReports()
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentProject
' Search for open AccessObject objects in AllReports collection.
For Each obj In dbs.AllReports
If obj.IsLoaded = TRUE then
' Print name of obj.
Debug.Print obj.Name
End If
Next obj
End Sub
if you want to print the actuel reports change the lines to
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentProject
For Each obj In dbs.AllReports
docmd.openreport obj.Name
Next obj
Beeps what do you mean straight from the help files?
vba editor help files? sorry if it was.
i don't have it currently installed. i thought i did a full instalation of xp access, but it says i need to reinsert cd.
i'll get the cd and install it before i ask anymore questions.
pwise your snippet was especially helpful.
i'm not sure what Beeps snippet does. I thought debug.print would tell me what reports are open. but i dont see any thing when i call that sub from a button. with or without reports currently loaded.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.