Deleting Record Error

AngelicGuardian

Village Idiot
Local time
Today, 17:56
Joined
Apr 7, 2003
Messages
43
I have a delete button on my form and every time I click on it, it gives me an error

On Error GoTo cmdDeleteMessage_Error

If IsNull([DataID]) Then Exit Sub
If MsgBox("Are you sure you wish to delete this record?", vbQuestion + vbYesNo, "Confirm Delete") <> vbYes Then Exit Sub
WorkLogEntry "Message - Delete", [FileNo], lblClient.Caption, "ID No: " & [DataID]
DoCmd.SetWarnings False
DoCmd.RunCommand acCmdDeleteRecord <-this is where i get the error

On Error Resume Next
DoCmd.GoToRecord , , acPrevious
If Me.AllowAdditions = False Then DoCmd.Close
DoCmd.SetWarnings True

Exit Sub

cmdDeleteMessage_Error:
GlobalErrorHandle "all-MessageData", "cmdDeleteMessage_Click", Err, Err.Description

Anytime I run this I get the following error: run-time error '3136':
the field is to small too small to accept the amount of data you attempted to add. Try inserting or pasting less data.

What in the world??? Pasting what data??
 
What does this do?

Code:
WorkLogEntry "Message - Delete", [FileNo], lblClient.Caption, "ID No: " & [DataID]

It looks like a Sub Procedure
 
Yes thats a sub procedure it enters data into a log field with data on what is happening here! But without that I still get the error
 
What Happens when you select the record and press the delete Key?
 

Users who are viewing this thread

Back
Top Bottom