Hi,
Depends of your Access version, with Access 2, 97 and 2000 I "think" you
can. It is a matter to SHELL within the table validation rule. The exact
syntax is a little bit tricky and I don't have any of the mentioned versions
installed, but may be Google can speak to you. You can refer to field of the
SAME record in the TABLE validation rule, but you cannot use VBA functions.
iif and shell are defined inside Jet, so it is ok to use them. From memory,
I would start with something like:
iif( compareField = "toto", 0<>shell( "Notepad.exe"), true)
to conditionally open Notepad if toto is to be stored in compareField. Note
that with Jet, only the relevant portion of the iif is evaluated, so shell()
should not be evaluated if something else than toto is stored. I used
Notepad instead of "sending mail", it is easier for debugging purposes.
Note that I don't claim the syntax is right, it is by memory and I didn't,
can't, test it.
Hoping it may help,
Vanderghast, Access MVP