Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2014
    Posts
    2

    Unanswered: Access 2007 CDO - Attachments ( Hard one )

    Good day everyone,
    This is my very first forum post anywhere!

    I am building a database to manage my every day work and projects. I have been trying so hard to be able to send Emails from access using a gmail account. I was successful on sending emails (subject, body, cc, bcc, to ). As I come to the attachment part, I can't figure out any lead on how to do it.

    I have my attachments stored in my database as fields and in some cases each attachment field holds more than one attachment. I was proactive on making all these attachments be part of subforms (3 in total) and my plan is to have a way to include these subforms on the main form I am sending emails from. Reason for that is because on that main form, all of my CDO, Email attributes get inputted.

    Now the big, big challenge is : How do I get to the point where I can select any attachment(s) so that they get added to my .Addattachment.

    The challenge mostly goes into

    1-How to have a unique link to every attachment, given that access stores multiple attachments in a single field.

    2-I have 3 fields and each one of them can have many attachments. I assume that each attachment will have a checkbox to it, which when checked my code will eventually know that it is to be included in the Email.

    If someone is comfortable in helping me out, I can surely be more descriptive and post my code or snapshots of what I am trying to do.

    thank you very much.

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    Quote Originally Posted by access2007help View Post
    This is my very first forum post anywhere!
    Welcome to the internet.

    Quote Originally Posted by access2007help View Post
    in some cases each attachment field holds more than one attachment
    From a database design perspective, each attachment should be a separate record, and you should certainly not have multiple attachments in the same field. This could be part of your problem.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Jun 2014
    Posts
    2

    Thanks

    Thank you BlindMan.

    Yes, I agree that attachment fields must have only 1 attachment per field. However, Access allows db end users to be able to add multiple attachments, which is why I figured that it is a not so bad practice. I just can't think of a way to make my code

    1-ask the user to chose which attachments they wish to include in the email (Given that they exist in 3 single sub-forms inside my main form)

    2-attach selected ones.


    If you know how to do that, it would be great to help me out even by writing a psuedocode, this way I can research and get it done.

    If you can't, it is also cool.

    thx

  4. #4
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    Moved to Access topic - you'll get better answers there, methinks
    George
    Home | Blog

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •