I have the following code that INSERTS data to a table. It works fine but when the [DATEOFISSUE] is null then I get an error. i need to have a handler for NULL.
How I reproduce the error is if I delete a date in this [DATEOFISSUE]. Sometimes I have to delete the date because the date was entered in error by a user.
(I would also like to know if the setwarnings is not advised)
Private Sub txtDateOfIssueSB_BeforeUpdate(Cancel As Integer)
Dim strSQL As String
CurrentDb.Execute "qryUpdateEUNameMS", dbFailOnError
strSQL = "INSERT INTO tblLCIssueDateHistory (fldDate, letterOfCreditID, EndUserID, IssueDate, LCNo, Amount) VALUES (#" & Format(Date, "m\/d\/yyyy") & "#," & Me!ID & "," & Me!EndUserID & ", #" & Me!DateOfIssueSB & "#,'" & HyperlinkPart(Me!LCNo, acDisplayText) & "'," & Me!Amount & ")"