If cboSearchType.Text = "Accredited Month" Then
If rs.State = 1 Then rs.Close
SQL = "SELECT * FROM BusinessInfo WHERE " & " AccreditationDate " & " like '" & cboMonths.Text & "%'"
rs.Open SQL, con
While rs.EOF = False
With grdSearchResults
.Redraw = False
.Rows = .Rows +1
.Row = .Rows - 1
.Col = 1: .Text = grdSearchResults.Rows - 1
.Col = 2: .Text = rs!BusinessName
.Col = 3: .Text = rs!ApplicantType
.Col = 4: .Text = rs!ApplicantName
.Col = 5: .Text = rs!BusinessAddress
.Col = 6: .Text = rs!AccreditationDate
.Redraw = True
End With
rs.MoveNext
Wend
Else
MsgBox "Accredited Business Entry Does not Exist!", vbCritical, "No Records Found!"
txtSEARCH.Text = ""
txtSEARCH.SetFocus
End If
im having a problem with the rows..can anyone help me? :) everytime i click my search button it still adds the same records shown in the first search click how can i do this..