G
Guest
Hi folks,
The following code works well until it finds a record where the ContractDate
field is blank. I get the above error when there is an empty date field.
Can anyone give me some guidance here?
Thanks!
TC2
-------------------------------------------------------------------------
StrSQL = "INSERT INTO [Contract Info] (ContractInfoLoginName,
ContractInfoDateModified, ContractInfoTimeModified, ContractNumber,
CustomerName, OriginalContractNegotiator, ContractDate)
StrSQL = StrSQL & _
"VALUES (" & _
"'" & Forms![Contract Info Edit Form]![ContractInfoLoginName] & "'," & _
"#" & Date & "#," & _
"#" & time & "#," & _
"'" & Forms![Contract Info Edit Form]![ContractNumber] & "'," & _
"'" & Forms![Contract Info Edit Form]![CustomerName] & "'," & _
"'" & Forms![Contract Info Edit Form]![OriginalContractNegotiator] &
"'," & _
"#" & Forms![Contract Info Edit Form]![ContractDate] & "#," & _
");"
The following code works well until it finds a record where the ContractDate
field is blank. I get the above error when there is an empty date field.
Can anyone give me some guidance here?
Thanks!
TC2
-------------------------------------------------------------------------
StrSQL = "INSERT INTO [Contract Info] (ContractInfoLoginName,
ContractInfoDateModified, ContractInfoTimeModified, ContractNumber,
CustomerName, OriginalContractNegotiator, ContractDate)
StrSQL = StrSQL & _
"VALUES (" & _
"'" & Forms![Contract Info Edit Form]![ContractInfoLoginName] & "'," & _
"#" & Date & "#," & _
"#" & time & "#," & _
"'" & Forms![Contract Info Edit Form]![ContractNumber] & "'," & _
"'" & Forms![Contract Info Edit Form]![CustomerName] & "'," & _
"'" & Forms![Contract Info Edit Form]![OriginalContractNegotiator] &
"'," & _
"#" & Forms![Contract Info Edit Form]![ContractDate] & "#," & _
");"