Ok let me re-frase th equestion a biut so I understand.
1. You want to click a button and pass a SQL statement to your recordset to find more than one instance of something????
------------------- here is a simple example -------
Public Function test()
On Error GoTo Err_test
Dim db As Database, rst As Recordset, SQL As String
Set db = CurrentDb
' SQL string.
SQL = "SELECT * FROM Orders WHERE OrderDate >= #1-1-95#;"
Set rst = db.OpenRecordset(SQL)
rst.MoveLast 'Note if you get an error# 3021 here then you have NO matches
If rst.RecordCount > 1 Then
'you have more than one record
MsgBox "You have " & rst.RecordCount & " records", vbInformation, "You have Matches"
Else
' do something differnt
End If
Exit_test:
Exit Function
Err_test:
Select Case Err.Number
Case 3021
' No current record
'Do something here
Case Else
MsgBox "Error # " & Err.Number & " " & Err.Description, vbInformation, "In Function test"
Resume Exit_test
End Select
End Function
------------------- DougP, MCP
Visit my WEB site
to see how Bar-codes can help you be more productive