I have created a table to time stamp how long it takes to process my work. The name of the table is tblTime. I am getting a syntax error in my INSERT INTO statement. What I want to do in insert the current time using the Now() command. Into the tblTime in the RptProcStart field with the clientID and clientName. The fields in the tblTime are:
ClientID
ClientName
RptProcStart
RptProcEnd
If I get this code to work, I will have to write another query to put anither time stamp when the procedure ends that would go into the RptProcEnd Field. Any help is greatly appreciated.
Tom
ClientID
ClientName
RptProcStart
RptProcEnd
If I get this code to work, I will have to write another query to put anither time stamp when the procedure ends that would go into the RptProcEnd Field. Any help is greatly appreciated.
Tom
Code:
' Get List of UCI to cycle through
strSQL = "SELECT u.clntid,u.uci " & _
"FROM [_UCI_Select] u " & _
"GROUP BY u.clntid,u.uci " & _
"ORDER BY u.uci;"
Set rstUCI = CurrentDb.OpenRecordset(strSQL, dbOpenSnapshot)
If Not rstUCI.EOF Then ' Make sure not empty set
With rstUCI
.MoveLast
.MoveFirst
End With
For iZ = 1 To rstUCI.RecordCount
' Get ClntID UCI Variables
liClntID = (rstUCI![clntid])
strUCI = (rstUCI![uci])
strCompany = Trim(GetCompany(liClntID))
strFilePath = "\\salmfilesvr1\Public\Client Services\AutoRpts\_Rpts\" & (strCompany) & "\" & (strUCI) & "\"
strTemplatePath = "\\salmfilesvr1\Public\Client Services\AutoRpts\Templates\"
'Start Time Count
[Blue] strSQL = "Insert INTO tblTime (strUCI, strCompany, RptProcStart=Now() " & _
" FROM ((tblTime);"
Debug.Print strSQL
CurrentDb.Execute strSQL [/Blue]
[\code]