Hi
Can anyone help, I am new at being a DBA and I am trying to adapt code for an audit trail in one on my DB's. I am getting a byRef type mismatch error on one of the lines. I know I need to declare what status is but I don't know what status is!!
Here is copy of code:
Option Compare Database
Dim bWasNewRecord As Boolean
Private Sub Form_AfterUpdate()
Call AuditEditEnd("Table Haematology Results-All Sites", "audTmpHaemo", "audHaemo", "Index", Nz(Me.Index, 0), bWasNewRecord)
End Sub
Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
Call AuditDelEnd("audTmpHaemo", "audFupHaemo", status)
End Sub
Private Sub Form_BeforeUpdate(Cancel As Integer)
bWasNewRecord = Me.NewRecord
Call AuditEditBegin("Table Haematology Results-All Sites", "audTmpHaemo", "Index", Nz(Me.Index, 0), bWasNewRecord)
End Sub
Private Sub Form_Delete(Cancel As Integer)
Call AuditDelBegin("Table Haematology Results-All Sites", "audTmpHaemo", "Index", Nz(Me.Index, 0))
End Sub
Thanks![Smile :) :)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Can anyone help, I am new at being a DBA and I am trying to adapt code for an audit trail in one on my DB's. I am getting a byRef type mismatch error on one of the lines. I know I need to declare what status is but I don't know what status is!!
Here is copy of code:
Option Compare Database
Dim bWasNewRecord As Boolean
Private Sub Form_AfterUpdate()
Call AuditEditEnd("Table Haematology Results-All Sites", "audTmpHaemo", "audHaemo", "Index", Nz(Me.Index, 0), bWasNewRecord)
End Sub
Private Sub Form_BeforeDelConfirm(Cancel As Integer, Response As Integer)
Call AuditDelEnd("audTmpHaemo", "audFupHaemo", status)
End Sub
Private Sub Form_BeforeUpdate(Cancel As Integer)
bWasNewRecord = Me.NewRecord
Call AuditEditBegin("Table Haematology Results-All Sites", "audTmpHaemo", "Index", Nz(Me.Index, 0), bWasNewRecord)
End Sub
Private Sub Form_Delete(Cancel As Integer)
Call AuditDelBegin("Table Haematology Results-All Sites", "audTmpHaemo", "Index", Nz(Me.Index, 0))
End Sub
Thanks