error message

Nirious

Registered User.
Local time
Today, 23:39
Joined
Jul 31, 2004
Messages
106
Whenever I delete a record in a continuous form, acces throws the following error after deleting the record:


Microsoft Access can't find the field 'I' referred to in your expression.
This is pretty annoying as the delete action finished ok. Any idea what caused this thingy? I have found the error to be number 2465.

Here is the code I have behind my delete button. I have one on each record line.
Code:
Private Sub cmdDelete_this_record_Click()
On Error GoTo Err_cmdDelete_this_record_Click
If Me.Input = "w" Then
    MsgBox "Onmogelijk dit artikel te verwijderen - Weegschaalartikel", vbInformation + vbOKOnly, "Verwijderen niet toegestaan"
    Exit Sub
End If

If MsgBox("Bent u zeker dat u dit artikel van de bestelbon wilt verwijderen?", vbInformation + vbDefaultButton2 + vbYesNo, "Artikel Verwijderen") = vbYes Then
    DoCmd.SetWarnings False
    DoCmd.RunCommand acCmdSelectRecord
    DoCmd.RunCommand acCmdDeleteRecord
    DoCmd.SetWarnings True
End If
Exit_cmdDelete_this_record_Click:
    Exit Sub

Err_cmdDelete_this_record_Click:
    MsgBox Err.Description
    Resume Exit_cmdDelete_this_record_Click
    
End Sub

Is it safe to just ignore this error and catch it with an empty errorhandler? As it appareantly doesn't affect anything.
 
Last edited:
I have for now just ignored the error. But if anyone knows how to avoid getting it, don't hesitate to tell ;)
 

Users who are viewing this thread

Back
Top Bottom