Now I have another problem. I keep getting a syntax error that I know has
something to do with a Null value problem. My code is:
ssql = "insert into x_task (project_id, task_subcategory_id,
task_description, supervisor_id, lead_id, " & _
"junior_id, staffing_notes, task_status_id, hot_potato_id,
task_status_notes) " & _
"values (" & Me.lstProject.Value & "," & Me.lstTaskSubType.Value &
",'" & _
dbl_quotes(Me.txtTaskNotes) & "'," & Me.lstSupervisor.Value & "," &
Me.lstLead.Value & "," & intJunior & ",'" & _
dbl_quotes(Me.txtStaffNotes) & "'," & Me.lstTaskStatus.Value & "," &
intHotPotato & ",'" & _
dbl_quotes(Me.txtStatusNotes) & "');"
where I have intJunior and intHotPotato defined as follows:
If IsNull(Me.lstHotPotato.Value) Then
intHotPotato = Null
Else
intHotPotato = Me.lstHotPotato.Value
End If
If IsNull(Me.lstJunior.Value) Then
intJunior = Null
Else
intJunior = Me.lstJunior.Value
End If