Update Date field on the fly

khurram7x

Registered User.
Local time
Tomorrow, 03:03
Joined
Mar 4, 2015
Messages
226
I'm trying to update a date field as soon as Check Box 'Rev._Date' change its status, checked or unchecked. But every time a write conflict box is appearing, attaching screenshot. Rev._Date is updated only if i press 'Drop Changes' button.

Both check box and Rev._Date fields are in same table, so I'm understanding bit that VBA is trying to change a field in a table while it is already in edit mode by me. But i don't know how the fix it.

I've tried different tricks and different variants of update code, even tried saving the record before updating Rev._Date column, without any success.

I'm attaching VBA code as well that I tried to use. How do i fix this issue please??

Thanks
 

Attachments

  • DateUpdate1.JPG
    DateUpdate1.JPG
    37.9 KB · Views: 96
  • DateUpdate2.JPG
    DateUpdate2.JPG
    37.7 KB · Views: 96
I would just put the field on the form (can be hidden) and update the value there. You generally should use a form or code to update, but not mix.
 
You generally should use a form or code to update, but not mix.
But the point is to update the revision date automatically once revision check box is clicked and record is saved. How would I achieve that?
 
Instead of updating the table you update the form:

Me.DateTextboxName = Now()
 

Users who are viewing this thread

Back
Top Bottom