I use the following code to load a combo box, which is a column on a subform datasheet, with the reports in my DB. It works great but I want to limit the values in the combo box to reports that have not been used as a report name for records already in the subform. Any ideas on how I might do this?
Thanks,
vmon
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
Forms!frmEmailMaintReportList!frmEmailMaintReportList_sub![Name_Internal].RowSourceType = "Value List"
Forms!frmEmailMaintReportList!frmEmailMaintReportList_sub![Name_Internal].RowSource = strValues
Thanks,
vmon
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
Forms!frmEmailMaintReportList!frmEmailMaintReportList_sub![Name_Internal].RowSourceType = "Value List"
Forms!frmEmailMaintReportList!frmEmailMaintReportList_sub![Name_Internal].RowSource = strValues