I have the following code that loads cbxCutSheet with all reports in the current project:
Dim rpt As AccessObject
Dim objCP As Object
Dim strReports As String
Set objCP = Application.CurrentProject
For Each rpt In objCP.AllReports
strReports = strReports & rpt.Name & ";"
Next rpt
cbxCutSheet.RowSourceType = "Value List"
cbxCutSheet.RowSource = strReports
I want to amend the code to limit the listed reports to those in a particular group, depending on the value of a second cbx. Specifically, whether the text "DH" or "CAS" appears in that text. A2002 DAO.
Any ideas? Thanks in advance.
Dim rpt As AccessObject
Dim objCP As Object
Dim strReports As String
Set objCP = Application.CurrentProject
For Each rpt In objCP.AllReports
strReports = strReports & rpt.Name & ";"
Next rpt
cbxCutSheet.RowSourceType = "Value List"
cbxCutSheet.RowSource = strReports
I want to amend the code to limit the listed reports to those in a particular group, depending on the value of a second cbx. Specifically, whether the text "DH" or "CAS" appears in that text. A2002 DAO.
Any ideas? Thanks in advance.