Dillinger4
Oct 10th, 2000, 12:02 PM
I have a table in Access with a field called Account
ID as Sunday through Saturday. Im trying to select the Account ID and the name of the field that is being passed
into the setconnection procedure but im not to sure how
to do this. strdaystored just holds the day of the week
produced from some functions. But how would i go about doing this?
Public Sub setconnection(strdaystored As String)
Dim i As Integer
Dim strSQL As String
Set db = OpenDatabase(KeySetting)
strSQL = "SELECT * FROM [Ticket Information]" = strdaystored
Set rs = db.OpenRecordset(strSQL)
Call findtickets
End Sub
private sub findtickets
For k = 1 To rs.RecordCount
MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1
MSFlexGrid1.TextMatrix(k, 0) = rs![Account ID]
MSFlexGrid1.TextMatrix(k, 1) = rs![Saturday]????
rs.MoveNext
Next k
End Sub
'and then what would i reference the second rs! statement
'with since the field could be any day of the week.
Thanks All........
ID as Sunday through Saturday. Im trying to select the Account ID and the name of the field that is being passed
into the setconnection procedure but im not to sure how
to do this. strdaystored just holds the day of the week
produced from some functions. But how would i go about doing this?
Public Sub setconnection(strdaystored As String)
Dim i As Integer
Dim strSQL As String
Set db = OpenDatabase(KeySetting)
strSQL = "SELECT * FROM [Ticket Information]" = strdaystored
Set rs = db.OpenRecordset(strSQL)
Call findtickets
End Sub
private sub findtickets
For k = 1 To rs.RecordCount
MSFlexGrid1.Rows = MSFlexGrid1.Rows + 1
MSFlexGrid1.TextMatrix(k, 0) = rs![Account ID]
MSFlexGrid1.TextMatrix(k, 1) = rs![Saturday]????
rs.MoveNext
Next k
End Sub
'and then what would i reference the second rs! statement
'with since the field could be any day of the week.
Thanks All........