hi there i have a search button on the form which does work does the search very well how ever if a wrong search value is entered which does not exist in the database i get the Runtime error "3021"
here is my code
here is my code
Code:
Private Sub cmdSearch_Click()
Dim bkmk As Variant
Dim strField As String
Dim strWhere As String
Me.RecordsetClone.MoveFirst
strWhere = "Code Like" & Chr(34) & Me.txtsearch & "*" & Chr(34) & _
"OR Names Like" & Chr(34) & Me.txtsearch & "*" & Chr(34) & _
"OR Surename Like" & Chr(34) & Me.txtsearch & "*" & Chr(34) & _
"OR Line Like" & Chr(34) & Me.txtsearch & "*" & Chr(34) & _
"OR Broadband Like" & Chr(34) & Me.txtsearch & "*" & Chr(34) & _
"OR Activation Like" & Chr(34) & Me.txtsearch & "*" & Chr(34) & _
"OR Activation2 Like" & Chr(34) & Me.txtsearch & "*" & Chr(34) & _
"OR Orderdate Like" & Chr(34) & Me.txtsearch & "*" & Chr(34)
Me.Filter = strWhere
Me.FilterOn = True
If Me.RecordsetClone.NoMatch Then
MsgBox "No Match"
Else
bkmk = Me.RecordsetClone.Bookmark
Me.Recordset.Bookmark = bkmk
End If
End Sub