Allen Browne Audit - error on logging

G

Guest

I build in te code of Allen Browne following his instructions but something
must've gone wrong. When I try to edit a record on the form and then go to
another record an error-message appears: compile-error: ByRef-arguments do
not match.

Private Sub Form_BeforeUpdate(Cancel As Integer)
bWasNewRecord = Me.NewRecord
Call AuditEditBegin("tblStoringen", "audTmpStoringen", "Id", Nz(Me.Id,
0), bWasNewRecord)
End Sub

And bWasNewRecord is highlighted.
Who can help me out.

Edo
 
A

Allen Browne

Hi Edo.

If you are referring to the code in this link:
http://allenbrowne.com/AppAudit.html
you will need to understand VBA to work with this.

In the code window, choose Compile from the Debug menu.
This should take you to any line that does not compile.

For example step 1 (towards the end of the article) requires you to declare
bWasNewRecord in the General Declarations section of the form. That's right
at the top of the code in the module, immediately below the Option
statements.
 

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