Hi There. I'm new here, but it looks like there's some good info out there, so I'm optimistic about getting myself some answers!
What I'm doing is nothing more than trying to run an update query, and I'm fairly certain that my problems are coming from the date field, but I've rewritten this thing a bunch of times, so it could be anything at this point. I'm getting a syntax error from an SQL statement that translates to the following:
"UPDATE tblCallActionLog SET Action = 'Sample 2',
ActionComplete = False,
ActionCompletedBy = Null,
ActionCompletedDate = Null,
WHERE ActionIdNum = 7"
None of the above fields are required
My code follows:
If isEditing Then
ActionComplete = IIf(Forms!frmMainDataWindow.chbxActionCompleted = 0, False, True)
If Forms!frmMainDataWindow.cbxActionCompletedBy.Value = "" Then
ActionCompletedByString = "ActionCompletedBy = Null"
ActionCompletedByString = "ActionCompletedBy = '" + Forms!frmMainDataWindow.cbxActionCompletedBy.Value + "'"
If Forms!frmMainDataWindow.txtActionCompletedDate.Value = "" Then
ActionCompletedDateString = "ActionCompletedDate = Null"
ActionCompletedDateString = "ActionCompletedDate = #" + Forms!frmMainDataWindow.txtActionCompletedDate.Value + "# "
SQLText = "UPDATE tblCallActionLog SET Action = '" + Action + "', " & _
"ActionComplete = " + Str(ActionComplete) + ", " & _
ActionCompletedByString + ", " & _
ActionCompletedDateString + ", " & _
"WHERE ActionIdNum = " + Str(sbfrmCallActionLog!ActionIdNum)
SQLText = "INSERT INTO tblCallActionLog " & _
"(IncomingCallID, ClientSerNum, [Action])" & _
" VALUES('" + Str(IncomingCallID) + "', '" + Str(ClientSerNum) + " ', '" + Action + "')"
Any input on this subject would be greatly appreciated.