Madison123
Registered User.
- Local time
- Today, 14:11
- Joined
- Dec 16, 2010
- Messages
- 10
My user enters a value into a text box and selects search. The first record matching this value is returned. However I want the user to be able to continue selecting search and keep hitting records with this value untill the end. Can anyone help? im pretty new to this so any help people can offer would be great.. Below is the code I have and seems to be working fine but I just need to add in the RecordsetClone.Next function somehwere and it just does not seem to work for me..
Private Sub Search_Click() 'Searching
DoCmd.Requery
Set rst = Me.RecordsetClone ' new code
rst.FindFirst "[TRCSNNumber] = '" & Me![SN] & "' or[SerialNumber2] = '" & Me![SN] & "' or[SerialNumber3] = '" & Me![SN] & "' "
DoCmd.RunMacro "DateAndTime"
If Not Me.RecordsetClone.NoMatch Then
Me.Bookmark = rst.Bookmark
Else
MsgBox " The Number you have entered cannot be Found"
End If
Criteria
End Sub
Private Sub Search_Click() 'Searching
DoCmd.Requery
Set rst = Me.RecordsetClone ' new code
rst.FindFirst "[TRCSNNumber] = '" & Me![SN] & "' or[SerialNumber2] = '" & Me![SN] & "' or[SerialNumber3] = '" & Me![SN] & "' "
DoCmd.RunMacro "DateAndTime"
If Not Me.RecordsetClone.NoMatch Then
Me.Bookmark = rst.Bookmark
Else
MsgBox " The Number you have entered cannot be Found"
End If
Criteria
End Sub