Ok trying to update specific values into a query. here is the code I have now
Code:
Dim strtime As Date
Dim streqid As Integer
Dim strstatus As String
streqid = Me.ID
strtime = Me.Time_Delivered
strstatus = "Closed"
strSQL = "UPDATE HotCallsQ SET HotCallsQ.Status = '" & strstatus & "', HotCallsQ.[Time Job Ended] = #" & strtime & "# WHERE (((HotCallsQ.[Equipment DownTime ID])=" & streqid & "))"
Debug.Print (strSQL)
CurrentDb.Execute (strSQL)
strtime is a date
streqid is autonumber
the print results give the following:
UPDATE HotCallsQ SET HotCallsQ.Status = 'Closed', HotCallsQ.[Time Job Ended] = #1/24/2014 1:50:00 AM# WHERE (((HotCallsQ.[Equipment DownTime ID])=313))
I get the too few parameters error on the CurrentDb.Execute line.
Any help would be appreciated.
Or is there is a better way to do this besides SQL string?
Thanks