Once you make a selection from the List Box the Command Button caption will change to the Company Name chosen and the List Box will become invisible.
Simulate a Drop Down Box...
Create a Drop Down, like those found on Web pages, as opposed to a regular Combo Box. The only caveat would be is you cannot have controls directly below because you will using a List Box which takes up considerably more space than a regular Combo Box. To download the sample click here.
The difficult I do immediately, the impossible takes a little bit longer.
Forms
When you initially open the Form all you see is the Command Button. Once you click on it the List Box will appear.
Option Compare Database
Option Explicit
Private Sub lstListBox_AfterUpdate()
Me.cmdSelectCompany.SetFocus
Me.lstListBox.Visible = False
Me.lstListBox.RowSource = "SELECT [tblClientProfile].[cpClientID], [tblClientProfile].[cpCompanyName] FROM tblClientProfile;"
Me.cmdSelectCompany.Caption = Me.lstListBox.Column(1)
End Sub
Private Sub cmdSelectCompany_Click()
If Me.lstListBox.Visible = True Then
Me.lstListBox.Visible = False
Else
Me.lstListBox.Visible = True
Me.lstListBox.SetFocus
End If
End Sub
Private Sub Form_Current()
Me.lstListBox.Visible = False
End Sub