si************@gmail.com wrote:
The code is stored in a module and a macro is called in beforeupdate
to run a function in the module.
Is the syntax just cancel = True ?
But i still dont know how to move to the next form.
It just stays on the currwent form if its validated.
All you need is for your validation code to return True or False (make it a
function). Then in your BeforeUpdate event...
Cancel = MyFunction()
or
Cancel = Not MyFunction()
....depending on whether your function returns True upon validation failing
or upon validation passing.
Do NOT try to make your validation code also navigate to another record.
You let the user navigate by normal means and that will trigger BeforeUpdate
and if your Function does not cause BeforeUpdate to be cancelled then the
navigation will happen.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com