Results 1 to 4 of 4
  1. #1
    DelbyJones is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    11

    Need help with streamlining a query


    I run a preschool with Access 2010. I’m trying to build a query that, without modification, I can merge to e-mails with Word, giving parents a monthly update on their child’s status on various waitlists. (A child can be on up to 4 different waitlists, although some are just one one.)

    I have a query which returns a list of all waitlisted children but it has a separate line for each waitlist the child is on. Next I export that query to Excel, then I have to cut and paste by hand for the kids who are on more than one waitlist, waitlist2, waitlist3, and waitlist4 so each child has only one line on the spreadsheet and the family gets one e-mail with all the information.

    Ideally I’d like a query which would eliminate the hand work, which is time-consuming. Can anyone point me in the direction for building a query (perhaps a make-table query?) that would return a datasheet with only one line for each child, that has separate columns for any additional waitlist listings for each child?

    For example, my merged e-mail says: Your child Sally Smith is now
    #3 on the Mon-Wed-Fri AM class waitlist,
    #5 on the Tuesday-Thursday AM class waitlist
    #1 on the Tuesday-Thursday PM class waitlist

    I know I can do this with a report, but I don’t think there’s a quick and simple way to automatically e-mail report pages to different people? (Please correct me if that’s not true.)

    Thanks for any help anyone can offer.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    Reports can be emailed as a pdf attachment using the SendObject method. http://www.fmsinc.com/MicrosoftAcces...endObject.html

    Code could loop through a recordset and send individual email to each address in the recordset.

    There are other methods to send emails that will involve more code. https://www.accessforums.net/program...ook-21903.html
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    DelbyJones is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jul 2012
    Posts
    11
    Thanks for this response. I now consider myself an intermediate user, but I've never written code. I'm going to read up then play around a bit with what you sent you sent me.

    Will come back with what I can (and cannot) figure out!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,622
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums