When a user clicks on a combo box list and selects an item on the list, then changes their mind and wishes no selection. How do you do that? Control-click does not seem to work. Does this take special programming? s-)
The user only has to press the delete key to clear the combobox. In your After Update procedure for the combobox you need to test for null so that your code does not execute. Like this:
Private Sub cboClient_AfterUpdate()
Dim rst As DAO.Recordset
' If a client was selected in
' the cboClient combobox, execute
' the FindFirst function
If Not IsNull(cboClient) Then
Set rst = Me.RecordsetClone
'Find the record that matches the control
With rst
.FindFirst "[CustomerID] = '" & cboClient& "'"
If .NoMatch Then
MsgBox "Record not found"
Else
Me.Bookmark = .Bookmark
End If
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.