Sub oLoadFormsToCombo()
On Error GoTo EH
Dim frm As Object
Dim I As Integer
For I = cmbFormsAndReports.ListCount - 1 To 0 Step -1
Me.cmbFormsAndReports.RemoveItem (I)
Next I
Me.cmbFormsAndReports.SetFocus
Me.cmbFormsAndReports.Text = ""
Me.cmbFormsAndReports.AddItem ("")
For Each frm In CurrentProject.AllForms
Me.cmbFormsAndReports.AddItem (frm.Name)
Next
Exit Sub
EH:
MsgBox "Error loading forms: " & Err.Description
End Sub
if me.name<>frm.name then
docmd.OpenForm frm.name,acDesign,,,,acHidden
me.cmbFormsCaption.AddItem (forms(frm.name).Caption)
docmd.close acForm,frm.name
End If
But why would you want these in two separate combo boxes, instead of displaying both the formname and caption in the same combo with appropriate column widths so that both can be seen when dropped down, which is what I would do. Then, if you need to actually see both after a form is selected from the combo, use the AfterUpdate event to populate a textbox to display the caption of the selected form.