Celeste-
Add VBA code to the Form AfterUpdate and AfterInsert events that uses DAO code to open your log table and write what changes occurred and by whom. If you need to record specific changes to fields, then use the OldValue property of all the controls to get the "before" value of the field. Also set the Allow Deletions property of the form to No and provide a command button to do the logical delete. You need one more column in your table - perhaps called Deleted - that's a Yes/No field. Use a query for the Record Source of the form that includes a filter WHERE Deleted = False. In your command button, set Deleted = True, save the record, write a log record, and Requery the form to cause the now "deleted" record to disappear.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
On May 22, 2015, at 6:32 PM, celestecpa <no_reply@yahoogroups.com> wrote:
John:
The users are using a form I created.
How do I do this? - "You can then use events in the form to write to a hidden log table what has changed and by whom."
How do I flag an entry as deleted?
Thank you for your help.
Celeste
__._,_.___
Posted by: John Viescas <johnv@msn.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (4) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar