Hi. I am using the following code to list all the caption names of forms. Is there any way to do this without opening each form? Thanks
Sub oLoadFormsToCombo()
On Error GoTo EH
Dim frm As Object
Dim I As Integer
For I = Me.cmbFormNameAndCaption.ListCount - 1 To 0 Step -1
Me.cmbFormNameAndCaption.RemoveItem (I)
Next I
Me.cmbFormNameAndCaption.SetFocus
Me.cmbFormNameAndCaption.Text = ""
Me.cmbFormNameAndCaption.AddItem ("")
For Each frm In CurrentProject.AllForms
Me.Form_Name.AddItem (frm.Name)
If frm.Name <> Me.Name And frm.Name <> "f_Login" And frm.Name <> "f_MainOptions" Then
DoCmd.OpenForm frm.Name, acDesign, , , , acHidden
Me.cmbFormNameAndCaption.AddItem (Forms(frm.Name).Caption)
DoCmd.Close acForm, frm.Name
End If
Next
Exit Sub
EH:
MsgBox "Error loading forms: " & Err.Description
End Sub
Our community of experts have been thoroughly vetted for their expertise and industry experience.
The Fellow title is reserved for select members who demonstrate sustained contributions, industry leadership, and outstanding performance. We will announce the experts being inducted into the Experts Exchange Fellowship during the annual Expert Awards, but unlike other awards, Fellow is a lifelong status. This title may not be given every year if there are no obvious candidates.
The Most Valuable Expert award recognizes technology experts who passionately share their knowledge with the community, demonstrate the core values of this platform, and go the extra mile in all aspects of their contributions. This award is based off of nominations by EE users and experts. Multiple MVEs may be awarded each year.