Hi Everyone,
I'd like to ask your help on how to write IIF() condition inside the INSERT INTO statement. HEre's my code:
strSQL = "INSERT INTO tab_Summary (areaOfCalls, cs_datefrom, cs_dateto, MCalls, Destin, OCalls) " & _
"VALUES ('" & Me.[Text295] & "', " & _
"'" & Me.[dfrom] & "', " & _
"'" & Me.[dto] & "', " & _
"'" & Me.[minCalls] & "', " & _
"'" & Me.[Dest] & "', " & _
"'" & Me.[Outgoing Calls subform1].Form![OutCalls] & "');"
DoCmd.RunSQL strSQL
If NumCalls is empty/null, how can I write my condition:
if minCalls = null then ' minCalls is based on the calculated value
NCalls equals to "00:00:00"
else
NCalls equals to value of NumCalls
end if
Please Im asking your help.
Thank you and more power.
REgards,
Jerry
I'd like to ask your help on how to write IIF() condition inside the INSERT INTO statement. HEre's my code:
strSQL = "INSERT INTO tab_Summary (areaOfCalls, cs_datefrom, cs_dateto, MCalls, Destin, OCalls) " & _
"VALUES ('" & Me.[Text295] & "', " & _
"'" & Me.[dfrom] & "', " & _
"'" & Me.[dto] & "', " & _
"'" & Me.[minCalls] & "', " & _
"'" & Me.[Dest] & "', " & _
"'" & Me.[Outgoing Calls subform1].Form![OutCalls] & "');"
DoCmd.RunSQL strSQL
If NumCalls is empty/null, how can I write my condition:
if minCalls = null then ' minCalls is based on the calculated value
NCalls equals to "00:00:00"
else
NCalls equals to value of NumCalls
end if
Please Im asking your help.
Thank you and more power.
REgards,
Jerry