Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help identifying when this code returns no match... 1

Status
Not open for further replies.

dlsd619

Technical User
Jul 11, 2007
14
0
0
US
I use the following code to jump to an account by entering an account number. I just need to put a little MsgBox error in there saying there is no such account number when a bad account number is entered. It originally was a Combo Box and the error simply went in the NotInList Event, however, it is now a text box because there was to many records and no real reason to have a combo.

Right now it will just stay at the previous Account number after update and do nothing else. How do I trap this?

After_Update:
Me.RecordsetClone.FindFirst "[AccountNumber] = " & Me![txt_Jump]
Me.Bookmark = Me.RecordsetClone.Bookmark
 
How about NoMatch?

Code:
If Me.RecordsetClone.NoMatch Then
    MsgBox "Oops"
Else
    Me.Bookmark = Me.RecordsetClone.Bookmark
End If
 
Wow...sure didn't know about "NoMatch"...thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top