Hey...just wonder if anyone new how to use an input box to search for and display information in a Grid?
Here is what i'm trying...it worked in the change event, but i thought it might be easier for the user to use a button...so i wanted to use the click event for an input box...here is what i have...
Private Sub Command26_Click()
Dim db As Database
Dim rs As Recordset
Dim strFile As String
Dim strSQL As String
strFile = "a:\tracker"
InputBox "Enter Agent Name"
strSQL = "SELECT * FROM tracker where aname = '" & combo5.Text & "' and date = '" & Text2.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
Here is what i'm trying...it worked in the change event, but i thought it might be easier for the user to use a button...so i wanted to use the click event for an input box...here is what i have...
Private Sub Command26_Click()
Dim db As Database
Dim rs As Recordset
Dim strFile As String
Dim strSQL As String
strFile = "a:\tracker"
InputBox "Enter Agent Name"
strSQL = "SELECT * FROM tracker where aname = '" & combo5.Text & "' and date = '" & Text2.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