• Email & Letters (A2K/XP)

    Author
    Topic
    #436185

    Hello All:

    Attached is a sample of a database I have with which I am trying to email letters. The letters are 3 pages long and each email address should get 1 letter. The way it is now, each email address is getting all the letters. I have tried to follow previous posts on this subject (#275460, #547736, etc). I think I have hit the proverbial wall. The form needs to be opened and “TA” entered as the prefix. The code from the previous posts is behind the cmd button. Any and all suggestions are greatly appreciated. TIA.

    Viewing 0 reply threads
    Author
    Replies
    • #1033222

      You forgot an essentail part from post 275460: you need code in the On Open event of the report to limit the records displayed to those whose e-mail address has been set in the global variable.

      See attached version (I cleaned up the code a bit)

      • #1033225

        Thank You Hans. What takes us mere mortals days, you do in minutes. BTW, Congratulations on your posts. A valuable asset to us all.

      • #1033231

        Thank you Bill & Hans

        I was looking for this, worked fine with a2k and ol2k and for testing:

        ‘ For testing (Access 2000, 2002 or 2003 only):
        ‘DoCmd.OpenReport stDocName, acViewPreview

        John

        • #1033234

          In the code in the database I posted, I added acDialog as WindowMode argument. This causes the code to wait until the user closes the report before opening it for the next e-mail address, so you can check all output. If you omit acDialog, the code will continue, so you’ll only see the result for the last e-mail address. But acDialog for reports was introduced in Access 2002, so you can’t use it in Access 2000.

    Viewing 0 reply threads
    Reply To: Email & Letters (A2K/XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: