The SQL INSERT INTO will fail if the variable I am inserting has the value of Null.
The variable costLab is Variant data type. The non-Null value would be Decimal.
db.Execute ("INSERT INTO budget
(wbsid, category, capture_date, budget_date, budget_type, month_value) " & _
"VALUES ('" & wbsid & "', 'Labor', #" & importDate & "#,
#" & monthDate & "#, 'Forecast', " & costLab & ");")
I want to insert Null if the code that sets costLab returns Null. But if a value is returned I want to insert that value. Obviously I could write an If statement that checks for null then insert "Null" directly but I wanted to know if there was a way without the If statement to insert Nulls via a variable.