A
Alan
Hi,
Looking for a bit of help. Have a combo box on a form (selecting property
address) when I enter say No 1 the combo box drops down displaying a list of
all propertiers starting with 1 ( i.e. 1 North Street, 1 South Street,
etc.) I then use the arrow keys on the keyboard to move to the property
address and press Enter. The combo box drop down closes and the record
selected is displayed on the form.
The problem I have if after the combo box drops down I select the property
address with the mouse the record selected is displayed on the form but the
Combo box stays in the drop down position and you have to click somewhere
out of the drop down list before it will close. The code on the Combo is
as follows:
After Update event:
Sub Combo27_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[PropID] = " & Me![Combo27]
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
On Change Event
Private Sub Combo27_Change()
Me!Combo27.Dropdown
End Sub
On Exit Event:
Private Sub Combo27_Exit(Cancel As Integer)
On Error GoTo Combo27_Exit_Err
Combo27 = Null
Combo27_Exit_Exit:
Exit Sub
Combo27_Exit_Err:
MsgBox Error$
Resume Combo27_Exit_Exit
End Sub
Any help would be appreciated as I have spent hours trying to get this to
work. Thanks, in advance.
Looking for a bit of help. Have a combo box on a form (selecting property
address) when I enter say No 1 the combo box drops down displaying a list of
all propertiers starting with 1 ( i.e. 1 North Street, 1 South Street,
etc.) I then use the arrow keys on the keyboard to move to the property
address and press Enter. The combo box drop down closes and the record
selected is displayed on the form.
The problem I have if after the combo box drops down I select the property
address with the mouse the record selected is displayed on the form but the
Combo box stays in the drop down position and you have to click somewhere
out of the drop down list before it will close. The code on the Combo is
as follows:
After Update event:
Sub Combo27_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[PropID] = " & Me![Combo27]
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
On Change Event
Private Sub Combo27_Change()
Me!Combo27.Dropdown
End Sub
On Exit Event:
Private Sub Combo27_Exit(Cancel As Integer)
On Error GoTo Combo27_Exit_Err
Combo27 = Null
Combo27_Exit_Exit:
Exit Sub
Combo27_Exit_Err:
MsgBox Error$
Resume Combo27_Exit_Exit
End Sub
Any help would be appreciated as I have spent hours trying to get this to
work. Thanks, in advance.