Hi,
I have the following code in the form load event of my reporting form:
This uses all the report names to create a value list so that the user can select which report they want to use. However, I also have sub reports which I don't want users to access. Is there any way I can exclude the sub reports from the NewValList string? All sub reports are named with "Sub" at the end.
Hope you can help.
Thanks
Allison
I have the following code in the form load event of my reporting form:
Code:
Dim NewValList As String
NewValList = ""
Dim obj As AccessObject
For Each obj In CurrentProject.AllReports
NewValList = NewValList + Chr(34) + obj.Name + Chr(34) + ";"
Next obj
Me!ReportCombo.RowSourceType = "Value List"
Me!ReportCombo.RowSource = NewValList
Me!ReportCombo.value = Me!ReportCombo.ItemData(0)
This uses all the report names to create a value list so that the user can select which report they want to use. However, I also have sub reports which I don't want users to access. Is there any way I can exclude the sub reports from the NewValList string? All sub reports are named with "Sub" at the end.
Hope you can help.
Thanks
Allison