Not getting the hang of this stuff. Have the following query:
udq = _
"UPDATE BayCounts " & _
"SET [Count] = " & rsdbo.Fields("Count") - rsdbo.Fields("SumOfBalls") & "," & _
" [AddTime] = #" & TimeValue(Now()) & _
" [AddDate] = #" & DateValue(Now()) & _
"# WHERE ID = " & CInt(Right(rsdbo.Fields("Bayno"), 2))
DoCmd.SetWarnings False
DoCmd.RunSQL udq
DoCmd.SetWarnings True
DebugPrint of query prior to execution =
UPDATE BayCounts SET [Count] = 745, [AddTime] = #11:58:39 AM [AddDate] = #10/29/2012# WHERE ID = 1UPDATE BayCounts SET [Count] = 723, [AddTime] = #12:10:55 PM [AddTime] = #12:10:55 PM# WHERE ID = 1UPDATE BayCounts SET [Count] = 702, #[AddTime] = #12:19:08 PM [AddTime] = #12:19:08 PM# WHERE ID = 1
Run-time error '3075
Syntax error(missing operator) in query expression '12:28:20 PM [AddDate]=#10/29/2012#'
Think there is a # missing, but I've tried amny combination, none of which work
Appreciate the help
jpl
udq = _
"UPDATE BayCounts " & _
"SET [Count] = " & rsdbo.Fields("Count") - rsdbo.Fields("SumOfBalls") & "," & _
" [AddTime] = #" & TimeValue(Now()) & _
" [AddDate] = #" & DateValue(Now()) & _
"# WHERE ID = " & CInt(Right(rsdbo.Fields("Bayno"), 2))
DoCmd.SetWarnings False
DoCmd.RunSQL udq
DoCmd.SetWarnings True
DebugPrint of query prior to execution =
UPDATE BayCounts SET [Count] = 745, [AddTime] = #11:58:39 AM [AddDate] = #10/29/2012# WHERE ID = 1UPDATE BayCounts SET [Count] = 723, [AddTime] = #12:10:55 PM [AddTime] = #12:10:55 PM# WHERE ID = 1UPDATE BayCounts SET [Count] = 702, #[AddTime] = #12:19:08 PM [AddTime] = #12:19:08 PM# WHERE ID = 1
Run-time error '3075
Syntax error(missing operator) in query expression '12:28:20 PM [AddDate]=#10/29/2012#'
Think there is a # missing, but I've tried amny combination, none of which work
Appreciate the help
jpl