Call Call Audit_Trail Ambigious Error (1 Viewer)

fenhow

Registered User.
Local time
Today, 04:46
Joined
Jul 21, 2004
Messages
599
Hello,

I am trying to use the audit trail function on my form. I have a form with a subform on it.

When I make a change and try to save it I get this error:

Ambigious Name Detected; Audit_Trail?

Can someone please tell me why I am getting this error?

Thanks!

Fen
 

Dom DXecutioner

AWF VIP
Local time
Today, 04:46
Joined
Jun 25, 2007
Messages
57
hi,

more than likely you may have that same function more than once... or two different functions with the same name

check to see that this is not the case, if it is, rename of delete the duplicate function...
 

fenhow

Registered User.
Local time
Today, 04:46
Joined
Jul 21, 2004
Messages
599
Thanks, do i look in the code for the form? or all forms?

Thanks.
 

Dom DXecutioner

AWF VIP
Local time
Today, 04:46
Joined
Jun 25, 2007
Messages
57
While at Visual Basic Editor (VBE), from the menu select DEBUG -> Compile YourProjectName...

this should point out to the duplicate function or any other errors that may exist, once you find it, you can modify accordingly
 

fenhow

Registered User.
Local time
Today, 04:46
Joined
Jul 21, 2004
Messages
599
Thanks, this is all that i see in the Code; The first line is highlighted yellow, and Call Audit_Trail is highlighted blue? What do I change the name of or where to I find the duplicate? I really appreciate your help.

Fen

Option Compare Database
Option Explicit

Private Sub Form_BeforeUpdate(Cancel As Integer)
On Error GoTo Form_BeforeUpdate_Err

Call Audit_Trail

Form_BeforeUpdate_Exit:
Exit Sub

Form_BeforeUpdate_Err:
MsgBox Err.Number & " - " & Err.Description
Resume Form_BeforeUpdate_Exit

End Sub

Private Sub tbAuditTrail_DblClick(Cancel As Integer)
On Error GoTo tbAuditTrail_DblClick_Err

Beep
DoCmd.RunCommand acCmdZoomBox

tbAuditTrail_DblClick_Exit:
Exit Sub

tbAuditTrail_DblClick_Err:
MsgBox Err.Number & " - " & Err.Description
Resume tbAuditTrail_DblClick_Exit

End Sub
 

RuralGuy

AWF VIP
Local time
Today, 05:46
Joined
Jul 2, 2005
Messages
13,826
Did you per chance name your Standard Module the same as a Function or SubRoutine within it?
 

Dom DXecutioner

AWF VIP
Local time
Today, 04:46
Joined
Jun 25, 2007
Messages
57
At this point you may have to post a sample... Did you do what i suggested?
While at Visual Basic Editor (VBE), from the menu select DEBUG -> COMPILE YourProjectName
 

Users who are viewing this thread

Top Bottom