I'm trying to add a bunch of reports to a combo box. Here's the code:
Problem is that the report names are not very end user friendly, and won't really be. I'm looking for a way to add the report's Caption to the combo as well, and tried using a 2 column combo and the following:
cmbReport.AddItem varReport.Name & ";" & varReport.Caption
This doesn't work though as I get an object doesn't support this property or method error.
Any help appreciated.
Code:
Dim varReport As Variant
With CurrentProject
For Each varReport In .AllReports
If Right(varReport.Name, 1) = "Z" Then
cmbReport.AddItem varReport.Name
End If
Next varReport
End With
Problem is that the report names are not very end user friendly, and won't really be. I'm looking for a way to add the report's Caption to the combo as well, and tried using a 2 column combo and the following:
cmbReport.AddItem varReport.Name & ";" & varReport.Caption
This doesn't work though as I get an object doesn't support this property or method error.
Any help appreciated.