Trying to update a table value...
Code:
Dim dbCMC As DAO.Database
Dim strSEG As String
Dim lngSum As Long
Set dbCMC = CurrentDb
lngSum = DSum("[DetWgt]", "dbo_tblSubmittals", "[JobNum] = '" & Me.cboJobNum.value & "' And [Segment] = '" & Me.cboSegment.value & "'")
strSEG = "UPDATE dbo_tblSegments " & _
"SET [DetWgt] = " & lngSum & " " & _
"WHERE [JobNum] = '" & Me.cboJobNum.value & "' And [Segment] = '" & Me.cboSegment.value & "'"
dbCMC.Execute strSEG, dbFailOnError
It's Erroring on the Execute and saying "too few paramters. Expecting 1". I can't figure out where the problem is, did I forget anything?