B
Bongard
I have a combo box in a form that allows a user to type in a loan
number and on enter the form then pops up the information on that loan.
However, if the incorrect loan number is typed in I get the run time
error 3077 "Syntax error (missing operator) in expression." I have the
feeling the users of this database will be startled if this happens and
would like to avoid that error if at al possible and replacy it with a
more friendly message box. Here's a look at my code
Private Sub Combo31_AfterUpdate()
' Find the record that matches the control.
'MsgBox "No Matching Records"
'Select Case Err.Number
'Case Is = 3077
'MsgBox "There are no loans matching the loan number entered"
'Case Is <> 3077
Me.RecordsetClone.FindFirst "[Loan Number] = " &
Me.Combo31.Column(0)
If Not Me.RecordsetClone.NoMatch Then
Me.Bookmark = Me.RecordsetClone.Bookmark
End If
End Select
You can see that i tried to match the case number and display a message
box if this was the error but that didn't work(commented out). Also, if
the user keys in the correct loan number this combo box works just
fine.
Any ideas?
Thanks!
number and on enter the form then pops up the information on that loan.
However, if the incorrect loan number is typed in I get the run time
error 3077 "Syntax error (missing operator) in expression." I have the
feeling the users of this database will be startled if this happens and
would like to avoid that error if at al possible and replacy it with a
more friendly message box. Here's a look at my code
Private Sub Combo31_AfterUpdate()
' Find the record that matches the control.
'MsgBox "No Matching Records"
'Select Case Err.Number
'Case Is = 3077
'MsgBox "There are no loans matching the loan number entered"
'Case Is <> 3077
Me.RecordsetClone.FindFirst "[Loan Number] = " &
Me.Combo31.Column(0)
If Not Me.RecordsetClone.NoMatch Then
Me.Bookmark = Me.RecordsetClone.Bookmark
End If
End Select
You can see that i tried to match the case number and display a message
box if this was the error but that didn't work(commented out). Also, if
the user keys in the correct loan number this combo box works just
fine.
Any ideas?
Thanks!