Form_Delete

chaimribs

New member
Local time
Today, 11:49
Joined
May 13, 2008
Messages
7
I'm trying to add a date into a field instead of deleting the record.
The form delete event doesn't allow me to write the date into this field but the form dirty event does.
How can I write this and why doesn't this work?

Thanx.

Private Sub Form_Delete(Cancel As Integer)
Cancel = True
Me.Field12 = Now
End Sub
Private Sub Form_Dirty(Cancel As Integer)
Me.Field11 = Now
Me.Field12 = Now
End Sub
 
Private Sub Form_Delete(Cancel As Integer)
Cancel = True
Me.Field12 = Now
End Sub

Make ...

Private Sub Form_Delete(Cancel As Integer)
Me.Field12 = Now
Cancel = True
End Sub

-dK
 
It still doesn't work. I just put in dirty for testing. When I took out dirty both fields didn't update.
It doesn't seem to make a difference whether the cancel is first or not.
I you put the cancel on top other things like msgbox seem to work. I tried all diffrent setting but it would never update a field in this event. Is there a way to do it or am I just doing something wrong.

Thanx.
 
why are you trying to write a date in the use of the delete event to begin with?
 
I don't want to delete the record. I will write the date in this field. If this field is not null all my queries ignore it. If I ever need it or if I need to know when It was deleted I have the time and date.
 
Unable to write in to record on delete event

I'm still trying to find an answer to this unusual situation. I would really appreciate if someone one knows why this happens, how to get around this, and what else can't be done during this event.
 

Users who are viewing this thread

Back
Top Bottom