Making a module public

D

DDrowe

can a module be private? i know the code under a givin Form can be private
or public but what about a module?

I have a Audit function that will only work under one form out of four and I
can not figure our why.

HELP please
 
D

Douglas J. Steele

Modules aren't private or public, but the routines (i.e. Functions or Subs)
within them can be.

How have you declared your Audit function, and how are you trying to invoke
it?
 
D

DDrowe

I am fairly new at this so bear with me. The code under the form is private
and Calls routines from the module. Below is the code under the form EHSR
and calls from the Module "ajbAudit".

"Dim bWasNewRecord As Boolean

Private Sub Form_AfterDelConfirm(Status As Integer)
Call AuditDelEnd("audTmpEHSR", "audEHSR", Status)
End Sub

Private Sub Form_AfterUpdate()
Call AuditEditEnd("EHSR", "audTmpEHSR", "audEHSR", "Autonumber",
Nz(Me!Autonumber, 0), bWasNewRecord)
End Sub

Private Sub Form_BeforeUpdate(Cancel As Integer)
bWasNewRecord = Me.NewRecord
Call AuditEditBegin("EHSR", "audTmpEHSR", "Autonumber", Nz(Me.Autonumber,
0), bWasNewRecord)
End Sub

Private Sub Form_Delete(Cancel As Integer)
Call AuditDelBegin("EHSR", "audTmpEHSR", "Autonumber", Nz(Me.Autonumber, 0))
End Sub"
 
Top