B
bymarce
I have a form for sorting through a catalog of samples. I made a find box on
my form for the catalog number so records can be browsed more easily. I
added the following code to the before update property of the form to fill
the date in the DOLE field whenever the record is edited.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If (IsNull(DOC)) Then
DOC = Date
DOLE = Date
Else
DOLE = Now
End If
End Sub
If I switch records using the find box on my form after having changed
something in the form I get a run time error.
"Run-time error '-2147352567(80020009)': Update or Cancel Update with out
Addnew or Edit." "DOLE = Now" is highlighted when the debugger opens. I'm
using the DOLE for a macro that exports all new and reciently edited records
to excell as a back up on a weekly basis. I've tried moving the code to the
after update property of the form and I get a different error. Thanks.
Bymarce
my form for the catalog number so records can be browsed more easily. I
added the following code to the before update property of the form to fill
the date in the DOLE field whenever the record is edited.
Private Sub Form_BeforeUpdate(Cancel As Integer)
If (IsNull(DOC)) Then
DOC = Date
DOLE = Date
Else
DOLE = Now
End If
End Sub
If I switch records using the find box on my form after having changed
something in the form I get a run time error.
"Run-time error '-2147352567(80020009)': Update or Cancel Update with out
Addnew or Edit." "DOLE = Now" is highlighted when the debugger opens. I'm
using the DOLE for a macro that exports all new and reciently edited records
to excell as a back up on a weekly basis. I've tried moving the code to the
after update property of the form and I get a different error. Thanks.
Bymarce