[AccessD] Multiple Checkboxes

Bobby Heid bheid at appdevgrp.com
Mon Sep 22 08:38:11 CDT 2003


Hi Terri,
 
In your situation, what I do is name the check boxes serially.  Like
chkRecip1,chkRecip2,...chkRecip1N.
 
Then I would loop though them and process then that way.
 
Air code:
 
'you could use a select statement like
for i=1 to 4
     if me("chkRecip" & i) then
           select case i
                case 1
                     checked_Admin = "MS at email.com"
                case 2
                            checked_Admin = " <mailto:LB at email.com>
LB at email.com"
                case 3
                     checked_Admin = "#5 at email.com <mailto:#5 at email.com> "
                 case 4
                     checked_Admin = #4 <mailto:#4 at email.com> @email.com
<mailto:#4 at email.com> 
                     end select
            SendMail checked_Admin    'function to send the mail
            end if
       next i
 
' or you could set up an array of e-mail addresses first
 
dim strAddr(3)
 
      strAddr(0)="MS at email.com"
      strAddr(1)="MS2 at email.com"
      strAddr(2)="MS3 at email.com"
      strAddr(3)="MS4 at email.com"
 
    for i=1 to 4
         if me("chkRecip" & i) then
             SendMail strAddr(i)
             end if
       next i
 
Hope this helps,
Bobby

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Terri Jarus
Sent: Monday, September 22, 2003 9:15 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Multiple Checkboxes


I have four checkboxes, which if checked, determine who receives an email.
More than one checkbox may be selected.  How do I code this so that all the
applicable recipients are emailed?
 
Example - four checkboxes  - MS, PH, LB, NF
 
If MS is checked - Admin = "MS at email.com"
If LB is checked - Admin = LB at email.com
 
But what if MS and LB are both checked?  How do I word this?
 
I am having a brain cramp on this.  Can't use Select Case because each check
box is a unique field - right?
 
If someone can point me in the right direction, I would appreciate the help.
 
Thanks.
 
 
 
Terri Jarus
Director, Contract Support Services
jarus at amerinet-gpo.com
314-542-1902

---------------------------------------------------------------------------
This email and any files transmitted with it are confidential and
intended solely for the use of the individuals or entities to whom they
are addressed. If you have received this email in error please return 
it to the sender, and erase any copies thereof.


 Copyright 2003 AmeriNet 1nc. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030922/b1db5378/attachment-0001.html>


More information about the AccessD mailing list