Error when deleting new record

Lamb2087

Registered User.
Local time
Today, 23:00
Joined
Feb 7, 2003
Messages
103
I get this error when I am testing: I enter a value in the text box for a new record, I delete the value and try to move to another text box or move forward/ backward to another record.

Error reads: You have tried to assignq NULL value to a variable that is not a Variant data type.

Any suggestions??
 
Error w/New Record

Where would I put the code Me.Undo in oirder to make this work?

It would be better to put something in code to have it work better.
 
Add the following to a command button
Private Sub Cancel_Click()
On Error GoTo Err_Cancel_Click


If Me.Dirty = True Then
Me.Undo
Else
MsgBox "There is nothing to Undo"
End If

Exit_Cancel_Click:
Exit Sub

Err_Cancel_Click:
MsgBox Err.Description
Resume Exit_Cancel_Click

End Sub
 

Users who are viewing this thread

Back
Top Bottom