arfox
New member
- Local time
- Today, 15:13
- Joined
- May 30, 2004
- Messages
- 5
Hello all-
I'm having a syntax, possibly datatype problem with some VBA code and its driving me UP THE WALL!!
I'm trying to create a runnning sum totalH for a field in a query. I am taking the values from "TotalTime" and putting the running sum in HourTotal . The gist (minus selection loops etc) is:
Dim totalH as Date
...
LSQL = Lrs("TotalTime")
totalH = totalH + LSQL
LUpdate = LUpdate & " SET qryCalcTotalHours.[HourTotal] = " & totalH
db.Execute LUpdate, dbFailOnError
At execution, the value of totalH is 02:00:00AM.
I'm getting the error:
Syntax error(missing operator) in query expression '2:00:00 AM'
Any help graciously accepted.
Thanks-
Amy
I'm having a syntax, possibly datatype problem with some VBA code and its driving me UP THE WALL!!
I'm trying to create a runnning sum totalH for a field in a query. I am taking the values from "TotalTime" and putting the running sum in HourTotal . The gist (minus selection loops etc) is:
Dim totalH as Date
...
LSQL = Lrs("TotalTime")
totalH = totalH + LSQL
LUpdate = LUpdate & " SET qryCalcTotalHours.[HourTotal] = " & totalH
db.Execute LUpdate, dbFailOnError
At execution, the value of totalH is 02:00:00AM.
I'm getting the error:
Syntax error(missing operator) in query expression '2:00:00 AM'
Any help graciously accepted.
Thanks-
Amy