Dim strCommand As String,sd,wp
sd="NULL"
wp="NULL"
If Not isNull(Willpaydate) Then
wp = "'" & Format(Willpaydate, "Short Date") & "'"
End If
If Not isNull() Then
sd = "'" & Format(setdate, "Short Date") & "'"
End If
strCommand = "INSERT INTO [call] ([loannumber], [comments], [set],[date],[time],[user], [willpay]) "
strCommand = strCommand + "VALUES ('" + CStr(LnNo) + "', '" + commentsStr + "', " + sd + ", '" + Format(Date, "Short Date") + "', '" + Format(Time(), "hh:mm:ss AMPM") + "', '" + username + "', " + wp + ")"
CurrentProject.Connection.Execute strCommand, , adCmdText
|