Jim DeMarco
Jdemarco at hudsonhealthplan.org
Tue Mar 7 06:57:58 CST 2006
Here's a case where I'd use a custom collection class rather than an array. You can refer to my article in the March O5 list newsletter for details but I think you'll find it easier to navigate than an array. As I see it you'll create a cMailInfo class containing Name (do your concatenation on the way in if possible otherwise add FName, LName properties instead) and EmailAddress properties, then a custom collection class, cMailInfoColl, to hold cMailInfo items. You can grab the cContacts collection class from the article and make a few simple mods to accommodate this scenario. Glad to answer any questions on it. HTH Jim DeMarco -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Penn White Sent: Tuesday, March 07, 2006 5:29 AM To: Access Developers discussion and problem solving Subject: [AccessD] Using Multidimensional Arrays ACC03 - I'm sending out emails from Access to a list of recipients selected from a listbox. Since I don't have Exchange Server, I can't be sure that the entries in the 'workstations' Outlook Contact list is up-to-date. Consequently, I have to verity first that the Contact is in that workstation's Outlook Contact list and second that the email address hasn't changed. It's a bit messy and may be time consuming since every single email will have to check all the recipients before being sent but there would rarely be more than 10 recipients for an email and more usually only 2-3 and I can't think of any other way to do it. I was thinking of creating a multi-dimensional array to hold the FirstName, LastName and Email address for each selected recipient but I can't figure out how to do it. The number of entries in the array will vary depending on how many recipients are selected. There may not necessarily be a first name and the 'last name' may actually be a string of several words, like "Belton Manufacturing" for example. Once the array is created, I'll need to concatenate the first and last names and check them against the existing entries in Outlook Contacts, updating or adding as necessary. If I can get the entries out of the array, that won't be hard, I've already done if before and have developed functions for the various pieces. I've also seen some comparisons between using structures and arrays and maybe I should be using a structure here. I'm a bit befuddled. Penn -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com *********************************************************************************** "This electronic message is intended to be for the use only of the named recipient, and may contain information from Hudson Health Plan (HHP) that is confidential or privileged. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this message is strictly prohibited. If you have received this message in error or are not the named recipient, please notify us immediately, either by contacting the sender at the electronic mail address noted above or calling HHP at (914) 631-1611. If you are not the intended recipient, please do not forward this email to anyone, and delete and destroy all copies of this message. Thank You". ***********************************************************************************