tried for hours to figure out how to make a clear button that clears the RecordSource after a search...if I take it out the Me.RecordSource the cancel with Me.Requery works...if I leave it txtSearch field clears but Me.Requery doesnt work so the form stays at what it found instead of going back to all the records.
'---------------------------------------------
' 05. Cancel button
'---------------------------------------------
Private Sub cmdCancel_Click()
Me.Requery
Me.txtSearch = ""
Me.txtSearch.BackColor = vbWhite
Me.txtSearch.SetFocus
End Sub
'--------------------------------------------
' Form_Load
'---------------------------------------------
Private Sub Form_Load()
Dim strSearch As String
Me.txtSearch.BackColor = vbWhite
strSearch = "SELECT * FROM tblQuestion WHERE ((Question Like ""*" & strSearch & "*"") OR (Possible1 like ""*" & strSearch & "*"") OR (Possible2 like ""*" & strSearch & "*"") OR (Possible3 like ""*" & strSearch & "*"") OR (Possible4 like ""*" & strSearch & "*""))"
Me.RecordSource = strSearch
Me.txtSearch.SetFocus
End Sub