Display a list of all reports

stepone

Registered User.
Local time
Today, 18:43
Joined
Mar 2, 2004
Messages
97
Hi there,

Not sure where the best place to post this - so I'll try here.

I want to create a form which lists all reports in the current database, along with their description, so the user can choose which one to run.

This list would be dynamic, so as new reports are added they appear in the list.

I suppose there must be a system table somewhere which stores the reports etc, so I base the form on a query which queries that table, but if anyone can tell me the table name, or tell me I am wrong, that would be a great help,

Thanks,
StepOne
 
This will populate a combo box with a list of reports:

Code:
Private Sub Form_Load()
  Dim objAO            As AccessObject
  Dim objCP            As Object
  Dim strValues        As String

  Set objCP = Application.CurrentProject

  For Each objAO In objCP.AllReports
    strValues = strValues & objAO.Name & ";"
  Next objAO

  cboReports.RowSourceType = "Value List"
  cboReports.RowSource = strValues
End Sub
 

Users who are viewing this thread

Back
Top Bottom