' Using Value for TheName parameter to allow Null
With CurrentDb.CreateQueryDef(vbNullString, _
"PARAMETERS " & _
"[AccountID] Long, [TheName] Value, " & _
"[TheDate] DateTime, [TheValue] IEEEDouble; " & _
"INSERT INTO tblTransactions " & _
"( [fAccountID], [fNameID], [CkDate], [Num] ) " & _
"VALUES " & _
"([AccountID],[TheName],[TheDate],[TheValue]);")
.Parameters(0) = CLng(Nz(Me.cboAccount.Value, 0))
.Parameters(1) = IIf(Trim$(Nz(Frm.cboFullName.Value, vbNullString)) = vbNullString, _
Null, _
Frm.cboFullName.Value)
.Parameters(2) = DateValue(Nz(Frm.CkDate, Now))
.Parameters(3) = CDbl(Nz(Frm.Num, 0))
.Execute dbFailOnError
End With