querry for sending email

O

Osyris

hi all

i have this question..is it possible in access to create a querry so when
three check boxs are filled , to send an e-mail at a pre-defined email
adress?

thanks
 
M

Michel Walsh

If you use a system before the security move made by Microsoft, yes. As
example, on Windows 95 with Access 2, you can define a table validation
rule, rule that will return true after having call SHELL( ) if (iif) the
three fields are checked, kind of (syntax to be modified though):

iif( field1 AND field2 AND field3, 0 <> SHELL(... ), false )

as table validation rule. iif-Jet is crafted so that if the criteria is
false, the true part will not be executed. So, if one of the check box
(field1, field2 or field3) is not checked, the SHELL( ) won't be executed at
all.

The arguments you pass to Shell can involve fields of the actual record
(which is to be modified, or to be inserted) and invoke your e-mail stand
alone application ( dot-exe) that can send the e-mail.


You CANNOT use SHELL in a secure db for a table validation rule.

You CANNOT use a VBA function (User defined or otherwise) in a table
validation rule.

You can change a table validation rule from the User Interface for table
designs.



Hoping it may help,
Vanderghast, Access MVP
 
M

Michel Walsh

The third argument should be true, not false. Indeed, we must allow all the
cases where at least one of the check box is false to be modified, or
inserted:

iif( field1 AND field2 AND field3, 0 <> SHELL(... ), TRUE )


Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top