I'm attempting to search a recordset for an integer using the attached code. Included in the code snippet is an if...then...else construct that is puzzling me. I can't get the else part to come true. This results in the user always being taken to pallet 1 (first item in recordset) if the record isn't found which is deceiving. Any help would be much appreciated.
Please let me know what else you might need from me.
Private Sub cmbPalletSearch_AfterUpdate()
On Error Resume Next
Me.FilterOn = False
Dim rs As Recordset
Set rs = Me.Recordset.Clone
rs.FindFirst "[PalletNumber] = " & Me![cmbPalletSearch]
If Not rs.EOF Then
Me.Bookmark = rs.Bookmark
rs.FindFirst "PalletNumber = " & iLocate
MsgBox "Pallet Not Found"