I have a saved insert query to add a record to a table. The parameters for the query come from an unbound form. 2 of the fields for the table are of the yes/no data type. Th
You should probably add a bunch more error tracking and checking for Null values in your form fields before assigning them to your table. Saying that, this one fix might fix your immediate problem.
I assume your Z3 and Z5 fields are bit fields - seeing as that's how you declared the matching parameter types.
If that's so, you should probably trap for Null checkboxes and convert true(-1) to 1
' Set to 0 if checkbox is Null, Set to 1 if checked=true
' Bit fields can't take -1 values
qdf1.Parameters(5).Value = IIf(Nz(Me.chkZ3.Value, 0), 1, 0)
qdf1.Parameters(6).Value = IIf(Nz(Me.chkz5.Value, 0), 1, 0)
As a sidenote, I would also suggesting using named parameters instead of numeric indexes in case the order of those ever get changed - and also for readability and future maintenance ease
Instead of
qdf1.Parameters(0).Value = Me.cboUser.Value
Use
qdf1.Parameters("UserPar").Value = Me.cboUser.Value