On Dirty Event Procedure

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an intermediate understanding of Access. I have very little
understanding of VBA and code building. I'm working on it but I'm not there
yet. : )
I manage a butcher shop and I have developed a nice order form for employees
to enter customer's holiday orders. I have it set up exactly the way I want
it except for one thing...
Generally, my employees have little understanding of Access and computers.
When they change records or enter new records with my form I want them to be
prompted that they are about to change or add records. For example, if Joe
Shmoe has ordered a 7 pound prime rib roast I want that record to be
semi-permanent. My employees shouldn't be able to change that by accident.
If they try to alter that record I want Access to pop an error message asking
if they want to really want to change that record. The holidays are a VERY
crazy time for us and I don't want customer's orders to get mixed up. I'm
pretty sure this has to do with the Dirty event. I just have very little
clue on how to actually do it. Any help would be greatly appreciated.

Ben
 
dont use dirty event - use before update event (fires immediately before
updating the record - giving you chance to do something about it)

pseudo code:

sub form_before_update

if dirty then if msgbox("Do you want to save these changes", vbyesno) = vbNo
Then undo

end sub
 
Back
Top