Asp updating access check box
Other collaborations with Gunderloy are Automating Microsoft Access 2003 with VBA, Upgrader's Guide to Microsoft Office System 2003, ICDL Exam Cram 2, and Absolute Beginner's Guide to Microsoft Access 2003, all published by Que.Currently, Susan volunteers as the Publications Director for Database Advisors at When the values differ, the procedure executes an INSERT INTO statement that adds a new record to the Audit table, tracking that change.As is, the procedure tracks only changes to text box and memo controls.After all, you don't really need to maintain data types for auditing purposes. Print statement allows you to see the evaluated INSERT INTO statement in the Immediate window.
Usually, you can limit the result to a specific record or user.
However, it won't keep inappropriate users out of your system—you need security for that. Name & c DQ & ", " _ & c DQ & var Before & c DQ & ", " _ & c DQ & var After & c DQ & ")" 'View evaluated statement in Immediate window. You can use any bound form, as long as it allows edits.
In addition, a sophisticated user will know how to open the table and remove records that track their mistakes—although the missing primary key values should be a clue to you that records are missing. str SQL = "INSERT INTO " _ & "Audit (Edit Date, User, Record ID, Source Table, " _ & " Source Field, Before Value, After Value) " _ & "VALUES (Now()," _ & c DQ & Environ("username") & c DQ & ", " _ & c DQ & recordid. To follow our example, open the Shippers form's module in the VBE and enter the following statement to call the auditing subprocedure: Now, this is where you'll need to customize the example procedure to work with your forms.
Simply copy the evaluated statement from the Immediate window into the SQL window (Query Design) and run it.
Access will give you much better error clues than VBA.If you need to track changes in other types of controls, change that If statement to a Select Case in the form adding all the controls necessary: You probably noticed that the procedure passes old and new values as strings, regardless of their data type.