Re: Inserting empty items into a field.



You can try
NZ(K,"NULL")

....& Me.LOT & "'" & "," & i & "," & j & "," & Nz(K,"Null" & "," &
Nz(K,"Null") & ";"
I think that will concatenate into your statement correctly.

"ED007" <ED007@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:861C8C18-2202-4E96-8803-5C5ADE585E62@xxxxxxxxxxxxxxxx
I am using the SQL statement below to insert a record into a table. The
statement works fine if K contains a value. (both [ASH VALUE], AND [BULK
DENSITY] are double data types.) But I often want to set one or both to
empty/null. I seem to be able to do this if i edit the table manualy by
deleting the entry in those fields but how do I do it with the SQL
statement.
Can I "set K to null somehow?


strSQL = "INSERT INTO [LOT QC DATA] " _
& "([COMPOUND LOT], DRUM, SAMPLE,[ASH VALUE],[BULK DENSITY]) " _
& "SELECT " _
& "'" & Me.LOT & "'" & "," & i & "," & j & "," & K & "," & K & ";"


.