Prevent error& access message for combo Not_In_List

G

Gina

Hi all.

I am trying not to get this access triggered error message if an item is not
part of the list
_____________________________________________________________
Private Sub cboSearch_NotInList(NewData As String, Response As Integer)

MsgBox "Customer " & NewData & " is not part of this DB." & vbCrLf & _
"To create a new customer please press corresponding button
first or choose from list ."
cboSearch.Undo

End Sub

___________________________

If I set the cboSearch.text = "" I get a 'Null' error on the following event
in line -->
_________________________
Private Sub cboSearch_AfterUpdate()
Dim rs As Object

Set rs = Me.Recordset.Clone

If Not IsNull(rs) Then
--> rs.FindFirst "[CustID] = " & Str(Me![cboSearch])
Me.Bookmark = rs.Bookmark
End If
End Sub
______________________

any help highly welcome - like always ;)

Thanks,
Gina
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top