B
Bill
I have a textbox "tbSession1" (Actually I have several)
that when double-clicked will cause a related combo
box to become Visable and dropped. I can obviously
capture the name of the textbox in it's Double-click event,
but as the combo box gets the focus when an item is
chosen from the list, how do I code the assignment
statement as I set the text box with whatever string
was chosen from the combo box? Also, in the code
below I've not coded the capturing of the text box
control name correctly?
Some experimental code:
Option Compare Database
Option Explicit
Dim tbcntl As Control
Private Sub cmboNameList_Click()
Me(tbcntl) = Me.cmboNameList.Column(1)
Me.cmboNameList.Visible = False
End Sub
Private Sub tbSession1_DblClick(Cancel As Integer)
tbcntl = tbSession1 <<<<<<<<<FAILS
Me.cmboNameList.Visible = True
Me.cmboNameList.Dropdown
End Sub
that when double-clicked will cause a related combo
box to become Visable and dropped. I can obviously
capture the name of the textbox in it's Double-click event,
but as the combo box gets the focus when an item is
chosen from the list, how do I code the assignment
statement as I set the text box with whatever string
was chosen from the combo box? Also, in the code
below I've not coded the capturing of the text box
control name correctly?
Some experimental code:
Option Compare Database
Option Explicit
Dim tbcntl As Control
Private Sub cmboNameList_Click()
Me(tbcntl) = Me.cmboNameList.Column(1)
Me.cmboNameList.Visible = False
End Sub
Private Sub tbSession1_DblClick(Cancel As Integer)
tbcntl = tbSession1 <<<<<<<<<FAILS
Me.cmboNameList.Visible = True
Me.cmboNameList.Dropdown
End Sub