What version of Access are you using? If it's Access 2000 or 2002, you may
have to set a reference to DAO, as those versions don't have the reference
set by default.
While in the VB Editor (with no code running: check under the Run menu, and
click on End if it's enabled), select Tools | References. Scrcoll through
the list of available references until you find the one for Microsoft DAO
3.6 Object Library, select it (by clicking on the check box to the left of
it) then click on the OK button.

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Thank you for your help but when I pasted the code into the module in
> Visual
[quoted text clipped - 19 lines]
>>
>> http://members.iinet.net.au/~allenbrowne/AppAudit.html
Arlene - 12 Jun 2007 09:53 GMT
Thanks for your help as I added in the DAO version but I now have the error
that
ByRef argument type mismatch for bWasNewRecord) in the Nz(Me.Reference, 0),
bWasNewRecord). Please see the whole code below.
Call AuditEditEnd("tblAsset4", "audTmpAsset4", "audAssets4", "Reference",
Nz(Me!Reference, 0), bWasNewRecord)
> What version of Access are you using? If it's Access 2000 or 2002, you may
> have to set a reference to DAO, as those versions don't have the reference
[quoted text clipped - 29 lines]
> >>
> >> http://members.iinet.net.au/~allenbrowne/AppAudit.html
Douglas J. Steele - 12 Jun 2007 11:39 GMT
How have you declared bWasNewRecord in the code that calls AuditEditEnd?

Signature
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)
> Thanks for your help as I added in the DAO version but I now have the
> error
[quoted text clipped - 44 lines]
>> >>
>> >> http://members.iinet.net.au/~allenbrowne/AppAudit.html
Arlene - 13 Jun 2007 14:17 GMT
Doug,
Thanks for all your Help as it was much appreciated
Arlene
> How have you declared bWasNewRecord in the code that calls AuditEditEnd?
>
[quoted text clipped - 46 lines]
> >> >>
> >> >> http://members.iinet.net.au/~allenbrowne/AppAudit.html
Thanks for your help as I have added in the DAO Version but now I have the
following error ByRef argument type mismatch for bWasNewRecord at the end of
the statement below. Please could you advise me on how to remedy this problem.
Call AuditEditEnd("tblAsset4", "audTmpAsset4", "audAssets4", "Reference",
Nz(Me!Reference, 0), bWasNewRecord)
> Thank you for your help but when I pasted the code into the module in Visual
> Basic it does not like the following Code Which is Set db =. Please can you
[quoted text clipped - 18 lines]
> >
> > http://members.iinet.net.au/~allenbrowne/AppAudit.html