Results 1 to 4 of 4
  1. #1
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199

    Email Writing

    I want to write a email where there are 2 or 3 different ordernumbers for same email, i want to include the email in the mail part as single column table. how to do it?



    also can i use result of one recordset for other recordset?

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    what is your current code for sending the email?

    Typically with this sort of thing what you'd have to do is cycle through records in a recordset and build the body of your email by appending the data (in your case order numbers) line by line but there are other ways to do it, for instance exporting a document/excel spreadsheet and attaching the spreadsheet rather than listing them in an email. It really depends on your current process or how you want it to work.

    I'm assuming you want to do this with VBA because I don't think you can do it easily with a macro.

  3. #3
    drunkenneo is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    199
    Quote Originally Posted by rpeare View Post
    what is your current code for sending the email?

    Typically with this sort of thing what you'd have to do is cycle through records in a recordset and build the body of your email by appending the data (in your case order numbers) line by line but there are other ways to do it, for instance exporting a document/excel spreadsheet and attaching the spreadsheet rather than listing them in an email. It really depends on your current process or how you want it to work.

    I'm assuming you want to do this with VBA because I don't think you can do it easily with a macro.
    you got my point, i do not want an attachment for it, rather i would like to list in email.

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    So you have no code at all right now?

    look at the sendobject command for sending an email.

    http://www.fmsinc.com/microsoftacces...endobject.html

    look at this to cycle through a recordset:

    http://allenbrowne.com/ser-29.html

    look at section 5, all you'd be doing in it's place is extracting your order number adding a carriage return linefeed (vbcrlf) and moving to the next record.

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

Similar Threads

  1. Writing a Query!
    By dsaxena15 in forum Queries
    Replies: 1
    Last Post: 11-15-2012, 03:35 PM
  2. Replies: 4
    Last Post: 04-13-2011, 10:11 AM
  3. Help Writing VBA and call to query
    By brianb in forum Programming
    Replies: 7
    Last Post: 03-09-2011, 09:42 AM
  4. send email to email addresses in database?
    By cnstarz in forum Access
    Replies: 5
    Last Post: 03-02-2011, 09:46 PM
  5. Help writing multiple queries
    By wz72n01 in forum Queries
    Replies: 1
    Last Post: 05-24-2009, 12:30 PM

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