C
capt6741
I have a simple update block for dates. When the record is updated, I
recalculate some date fields. The problem I am encountering is the
record stays in edit mode after the update code ends. I cannot tab
out of the record or click out of it. I can close the form. I can
press "Esc" and it leaves edit mode WITH THE DATA SAVED.
The code below is executes completely with no errors but it does not
release the record from edit mode.
The code executing is:
in the AfterUpdate event:
If Me![Promotion_Media_cbo] = "BTL" Or Me![Promotion_Media_cbo] =
"PSU" Then
Me![EDS_Delivery_Due_Date] = DateAdd("ww", -3, Me![SchdEndDate])
Me![Printer_Due_Date] = DateAdd("ww", -7, Me![SchdEndDate])
Me![Disk_Due_Date] = DateAdd("ww", -9, Me![SchdEndDate])
End If
Me![SchdEndDate] is an unbound control with valid data.
If I add Me.Dirty = false I get runtime error 2115
"The macro of function set to the BeforeUpdate or ValidationRule
property for this field is preventing Microsoft Office Access from
saving the data in the field."
Pressing Esc exit edit mode but the data changes are
retained....saved.
recalculate some date fields. The problem I am encountering is the
record stays in edit mode after the update code ends. I cannot tab
out of the record or click out of it. I can close the form. I can
press "Esc" and it leaves edit mode WITH THE DATA SAVED.
The code below is executes completely with no errors but it does not
release the record from edit mode.
The code executing is:
in the AfterUpdate event:
If Me![Promotion_Media_cbo] = "BTL" Or Me![Promotion_Media_cbo] =
"PSU" Then
Me![EDS_Delivery_Due_Date] = DateAdd("ww", -3, Me![SchdEndDate])
Me![Printer_Due_Date] = DateAdd("ww", -7, Me![SchdEndDate])
Me![Disk_Due_Date] = DateAdd("ww", -9, Me![SchdEndDate])
End If
Me![SchdEndDate] is an unbound control with valid data.
If I add Me.Dirty = false I get runtime error 2115
"The macro of function set to the BeforeUpdate or ValidationRule
property for this field is preventing Microsoft Office Access from
saving the data in the field."
Pressing Esc exit edit mode but the data changes are
retained....saved.