L
lord
Hi,
I have added error handling code to my combo box.
Private Sub searchName_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
On Error GoTo ERR_Handler
Set rs = Me.Recordset.Clone
rs.FindFirst "[sdutentId] = " & Str(Nz(Me![searchName], 0))
On Error GoTo 0
Exit Sub
ERR_Handler:
MsgBox "Please empty search box before continuing!"
End Sub
But it doesn't display the message in msgbox, it displayed default ms access
error code. which is "The text you have entered isn't an item in the list."
Any idea why would it do it?
I have added error handling code to my combo box.
Private Sub searchName_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
On Error GoTo ERR_Handler
Set rs = Me.Recordset.Clone
rs.FindFirst "[sdutentId] = " & Str(Nz(Me![searchName], 0))
On Error GoTo 0
Exit Sub
ERR_Handler:
MsgBox "Please empty search box before continuing!"
End Sub
But it doesn't display the message in msgbox, it displayed default ms access
error code. which is "The text you have entered isn't an item in the list."
Any idea why would it do it?