Problem with creating an Audit Log

M

Mare

I've got a frmSell, where I want to track any changes with the help of Allen
Browne's Audit Log (http://allenbrowne.com/AppAudit.html). The problem is
that ever since I applied the code and followed all the instructions, the
form doesn't display previous entries no more neither is it possible to enter
new records. At one combo it is impossible to select any of the records, in
another it is possible, but I'm getting the error message "Field cannot be
updated" twice.

The form's code is as suggested (it does contain however two extra double
click procedures and one procedure, that starts the form with a new record):

Dim bWasNewRecord As Boolean

Private Sub Form_AfterDelConfirm(Status As Integer)

Call AuditDelEnd("audTmpSell", "audSell", Status)

End Sub

Private Sub Form_AfterUpdate()

Call AuditEditEnd("tblSell", "audTmpSell", "audSell", "Sell_ID", Nz(Me!
Sell_ID, 0), bWasNewRecord)

End Sub

Private Sub Form_BeforeUpdate(Cancel As Integer)

bWasNewRecord = Me.NewRecord
Call AuditEditBegin("tblSell", "audTmpSell", "Sell_ID", Nz(Me.Sell_ID, 0),
bWasNewRecord)

End Sub

Private Sub Form_Open(Cancel As Integer)

DoCmd.GoToRecord , , acNewRec

End Sub

Private Sub Employee_ID_DblClick(Cancel As Integer)

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmEmployee"
DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub

Private Sub Product_ID_DblClick(Cancel As Integer)

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "frmProduct"
DoCmd.OpenForm stDocName, , , stLinkCriteria

End Sub

Private Sub Form_Delete(Cancel As Integer)

Call AuditDelBegin("tblSell", "audTmpSell", "Sell_ID", Nz(Me.Sell_ID, 0))

End Sub


Does anybody have any idea, what could be the problem? Thank you very much in
advance!

Mare from Slovenia
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top