Hello,
Ok, I imagine I am overlooking something... why on Earth doesn't this work?
It's Access 2016/ODBC/SQL Server, *should be* simple insert, but I get syntax error...
The msgbox I included here, as well a screen shot of the table on the backend...
What am I not seeing? I'm going to blow a gasket!:banghead::banghead::banghead:
Thanks for any push in the right direction!
-Matt G.
Ok, I imagine I am overlooking something... why on Earth doesn't this work?
It's Access 2016/ODBC/SQL Server, *should be* simple insert, but I get syntax error...
Code:
strSQL = "Insert into dbo_OccurrenceMetrics (ActivityOccurrenceIDf, ActualCosts, ActualStaffHours, ActualStartDatetime, ActualEndDatetime, YesNo, TF, CompleteIncomplete, PercentageComplete, ValueRange, SubjectiveDesc1) VALUES (" & _
[listboxActivityOccurrences].[Value] & _
", '" & _
numActualCosts & _
"', '" & _
numActualStaffHours & _
"', " & _
Chr(35) & dtmStartActual & Chr(35) & ", " & Chr(35) & dtmEndActual & Chr(35) & _
", '" & _
cboYN & _
"', '" & _
cboTF & _
"', '" & _
cboCompleteIncomplete & _
"', '" & _
Replace(Format(Trim(txtPercentage)), "'", "''") & _
"', '" & _
Replace(Format(Trim(txtNumericRange)), "'", "''") & _
"', '" & _
Replace(Format(Trim(cboSubjectiveRange1)), "'", "''") & "');"
MsgBox ("strSQL: " & strSQL)
'DoCmd.SetWarnings False
DoCmd.RunSQL strSQL
'DoCmd.SetWarnings True
The msgbox I included here, as well a screen shot of the table on the backend...
What am I not seeing? I'm going to blow a gasket!:banghead::banghead::banghead:
Thanks for any push in the right direction!
-Matt G.