I am trying to list 2 sets of criteria in my Grid ( Agent Name and Date). As you can see it works fine for the Agent Name, but when I do the same code in the Text2.text_Change() which is my Date field, it groups all the Agent's Names with the same dates. I am trying to group only same names with same dates. Can anyone help?
Private Sub Combo5_Change()
Dim db As Database
Dim rs As Recordset
Dim strFile As String
Dim strSQL As String
strFile = "a:\tracker"
strSQL = "SELECT * FROM tracker WHERE aname = '" & combo5.Text & "'"
Set db = OpenDatabase(strFile)
Set rs = db.OpenRecordset(strSQL)
Call DisplayRSGrid(rs, MSFlexGrid1)
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
End Sub
Private Sub Combo5_Change()
Dim db As Database
Dim rs As Recordset
Dim strFile As String
Dim strSQL As String
strFile = "a:\tracker"
strSQL = "SELECT * FROM tracker WHERE aname = '" & combo5.Text & "'"
Set db = OpenDatabase(strFile)
Set rs = db.OpenRecordset(strSQL)
Call DisplayRSGrid(rs, MSFlexGrid1)
rs.Close
db.Close
Set rs = Nothing
Set db = Nothing
End Sub