Question : Can i make a field that will store any changes i make to other fields on a microsoft access form?

Hi Experts,

I have an old database that somehow stores any changes made to a record in a field called "Updates".  It's really cool, it does this automatically no matter which field i adjust and puts a nice little note in the "Updates" field.  I want to do this with a new database, but i can't figure out how this was accomplished in the old one.  I inherited the old one from another designer at work, and i didn't write this part of the db.  Do you know how to accomplish this?  Thanks :-)

Laura

Answer : Can i make a field that will store any changes i make to other fields on a microsoft access form?

Check in the BeforeUpdate or AfterUpdate event of the form.  That is where this is most likely being called from and where the originator of the had the code to call this function.  I don't know where he was getting the values for xClient and xClaim, but they would either have to be global variables or be values that are visible on the form.

Private Sub Form_BeforeUpdate

    Call WriteLog(me, xClient, xClaim)

End Sub

This is a pretty slick little function.  Basically, it loops through the various controls on the form, and checks to see if the "Tag" property of the control has any value in it.  If not, it ignores the control, if so, it records who made the change, and the value of some of the other controls.  So you need to open your form in design mode, identify the fields you want to record changes from, and place a value (any value) in the "tag" property of those controls.

Then, when you finish updating the form and move to the next form or close it, the
Random Solutions  
 
programming4us programming4us