I have this error display of "0" and I dont want this error msg to show.
I dont know what error it is because the code does what I want it to do.
I can usually handle an error by defining it with an IF statement.
For some reason I seem to not be able to do the same if the error is 0.
You can see in my error handler I do put an IF error = 0 then exit sub but the code does not exit and still displays the error of 0 msbox.
If an error is 0, is it suppose to be handled like this or maybe there is obviously something else going on? (note that the INSERT code does do what it is suppose to do)
Private Sub Amount_BeforeUpdate(Cancel As Integer)
On Error GoTo EH '<-- add this for error handling
Dim strSQL As String
If Not IsNull(Me.Amount) Then
'get an error if I try to save on before update
strSQL = "INSERT INTO tblLCAmountHistory (fldDate, letterOfCreditID, EndUserID, LCNo, Amount) VALUES (#" & Format(Date, "m\/d\/yyyy") & "#," & Me!ID & "," & Me!EndUserID & ",'" & HyperlinkPart(Me!LCNo, acDisplayText) & "'," & Me!Amount & ")"
If Error = 0 Then
MsgBox "Error: " & Err.Number & ": " & Err.Description