Combo Box / Exiting

RandyK

New member
Local time
Today, 15:04
Joined
Aug 26, 2002
Messages
7
This combo box searches on customer name (drop down list) and automatically goes to that record when I press the "Enter", "Tab" or "Esc" keys or if I "mouse click" on another field. However, I only want it to go to that record if I press the "Enter" key.

Sub Combo90_AfterUpdate()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[ID] = " & Me![Combo90]
Me.Bookmark = Me.RecordsetClone.Bookmark
Me.Combo90 = ""
Me.Req.SetFocus
End Sub

Thank you,
RandyK
 
Why don't you make it so that it only performs the action when you click on the selected item - I think the click action is the same as enter.

Sub Combo90_Click()
' Find the record that matches the control.
Me.RecordsetClone.FindFirst "[ID] = " & Me![Combo90]
Me.Bookmark = Me.RecordsetClone.Bookmark
Me.Combo90 = ""
Me.Req.SetFocus
End Sub
 
Thank you,

RandyK
 

Users who are viewing this thread

Back
Top Bottom