I have a combo box pulling a record from a table other than the one the form is sourced to. Users look for client's in the dropdown to automatically populate a set of the form's text boxes.
At times the user will type into the combobox in search of a client, who happens not to be in either of the tables. I have customized the message that comes up, no need to requery since the table the combobox is readonly.
What I cannot figure is, how to move the focus off the combobox when there is no client in the list from the integral table. SetFocus throws me into an irreversible loop.
Private Sub FindClientRecord_NotinList(NewData As String, Response As Integer)
Dim ans As Long
ans = MsgBox("You have entered....")
Me.Undo
Response = acDataErrContinue
End Sub
The cboFindClientRecord, does have the following in after update:
Me!CountyClientID = FindClientRecord].Column(0)
Me!LastName = Me![FindClientRecord].Column(2)
Me!FirstName = Me![FindClientRecord].Column(3)
Me!DOB = Me![FindClientRecord].Column(4)
At times the user will type into the combobox in search of a client, who happens not to be in either of the tables. I have customized the message that comes up, no need to requery since the table the combobox is readonly.
What I cannot figure is, how to move the focus off the combobox when there is no client in the list from the integral table. SetFocus throws me into an irreversible loop.
Private Sub FindClientRecord_NotinList(NewData As String, Response As Integer)
Dim ans As Long
ans = MsgBox("You have entered....")
Me.Undo
Response = acDataErrContinue
End Sub
The cboFindClientRecord, does have the following in after update:
Me!CountyClientID = FindClientRecord].Column(0)
Me!LastName = Me![FindClientRecord].Column(2)
Me!FirstName = Me![FindClientRecord].Column(3)
Me!DOB = Me![FindClientRecord].Column(4)