G
Guest
I've successfully used this code in several db's, but for whatever reason,
the db I'm working on now is have a problem inserting the "EditTo" records.
It just won't create EditTo records in the audit table.
I've determined the problem is in the append query. Here's the SQL the
function generates for the EditTo process:
INSERT INTO audSourceData ( audType, audDate, audUser ) SELECT 'EditTo' AS
Expr1, Now() AS Expr2, NetworkUserName() AS Expr3, tblSourceData.* FROM
tblSourceData WHERE (tblSourceData.RecID = 35004);
The problem is, I'm getting a primary key violation when this query runs,
thus no record is appended. The primary key in audSourceData is an
autonumber field called audID.
the db I'm working on now is have a problem inserting the "EditTo" records.
It just won't create EditTo records in the audit table.
I've determined the problem is in the append query. Here's the SQL the
function generates for the EditTo process:
INSERT INTO audSourceData ( audType, audDate, audUser ) SELECT 'EditTo' AS
Expr1, Now() AS Expr2, NetworkUserName() AS Expr3, tblSourceData.* FROM
tblSourceData WHERE (tblSourceData.RecID = 35004);
The problem is, I'm getting a primary key violation when this query runs,
thus no record is appended. The primary key in audSourceData is an
autonumber field called audID.