The following is the code:
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = DBEngine.OpenDatabase("c:\program files\Client Time\clienttimer.mdb")
'Open the Recordset
Set rst = db.OpenRecordset("TimeData")
Dim SQL As String
A = Combo1.Text
SQL = "SELECT SUM(totalTime) FROM TimeData WHERE name =" & Chr(34) & A & Chr(34)
Text1.Text = SQL
rst.Close
db.Close
This SQL returns this string: "SELECT SUM(totalTime) FROM TimeData WHERE name =" & Chr(34) & A & Chr(34)
Any help? I appreciate it!!
Dim db As DAO.Database
Dim rst As DAO.Recordset
Set db = DBEngine.OpenDatabase("c:\program files\Client Time\clienttimer.mdb")
'Open the Recordset
Set rst = db.OpenRecordset("TimeData")
Dim SQL As String
A = Combo1.Text
SQL = "SELECT SUM(totalTime) FROM TimeData WHERE name =" & Chr(34) & A & Chr(34)
Text1.Text = SQL
rst.Close
db.Close
This SQL returns this string: "SELECT SUM(totalTime) FROM TimeData WHERE name =" & Chr(34) & A & Chr(34)
Any help? I appreciate it!!