calling module in every form

aqif

Registered User.
Local time
Today, 08:32
Joined
Jul 9, 2001
Messages
158
Hi
smile.gif


I'm trying to build a module as :

Public Function CheckVal()

If MsgBox("You are changing the value of a field which is reffered in other information forms, are you aure?", vbYesNo) = vbNo Then
Me.ActiveControl = Me.ActiveControl.OldValue
End If

End Function

What I want to do is that on every text box of different forms I'll write like

AfterUpdate: =CheckVal()

When I put the same code within the form code section it executes OK, but because I have about 20+ forms so I want to build a module and then just call it whereever I want to call. I know I m missing smthng but can't seem to figure it out
wink.gif


Cheers!
Aqif
 
Hi
smile.gif


I tried ur suggestion but it is not working at the moment...maybe i m doing some mistake because it writes smthg like

=CheckVal([Me].[ActiveControl])

but its not working
frown.gif
can u give a little more detail please

Cheers!
Aqif
 

Users who are viewing this thread

Back
Top Bottom