Printing a form letter with Fields in Access

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • RLN

    Printing a form letter with Fields in Access

    I have an app that will send out an email periodically.
    My table has one row and three columns: a primary key, an "EmailFrom"
    Address and an Email template.

    The template is the text of the email and will have varying amounts and
    dates in each one sent.

    The template looks similar to this:
    "Check # (########) in the amount of ($9,999,999.99)
    was received and deposited on (xx/xx/xxxx).
    Please direct any questions to DeptHead@compan y.com"

    What is the best way to store this form letter template in an Access
    app? Right now the three items are stored in one row of a table. While
    that makes editing the form easy for the user, what is the best way to
    allow them to edit the template, yet be able to easily plug in the
    amount, check number and date without storing the templates multiples
    times due to data changes.

    Right now I am breaking this template up into chunks.
    Fixed text, followed by a concatenation of field#1, followed by more
    concatenation, etc.

    I'm sure there is a better way to do this. (??)


    *** Sent via Developersdex http://www.developersdex.com ***
  • fredg

    #2
    Re: Printing a form letter with Fields in Access

    On Tue, 29 Apr 2008 16:20:35 -0500, RLN wrote:
    I have an app that will send out an email periodically.
    My table has one row and three columns: a primary key, an "EmailFrom"
    Address and an Email template.
    >
    The template is the text of the email and will have varying amounts and
    dates in each one sent.
    >
    The template looks similar to this:
    "Check # (########) in the amount of ($9,999,999.99)
    was received and deposited on (xx/xx/xxxx).
    Please direct any questions to DeptHead@compan y.com"
    >
    What is the best way to store this form letter template in an Access
    app? Right now the three items are stored in one row of a table. While
    that makes editing the form easy for the user, what is the best way to
    allow them to edit the template, yet be able to easily plug in the
    amount, check number and date without storing the templates multiples
    times due to data changes.
    >
    Right now I am breaking this template up into chunks.
    Fixed text, followed by a concatenation of field#1, followed by more
    concatenation, etc.
    >
    I'm sure there is a better way to do this. (??)
    >
    *** Sent via Developersdex http://www.developersdex.com ***
    You need at least 3 fields per record.
    [CheckNum], [Amount], and [DateDeposited]

    Then, using one unbound text control in your report, set it's control
    source to:

    ="Check # " & [CheckNum] & " in the amount of " &
    Format([Amount],"Currency") & " was received and deposited on " &
    Format([DateDeposited],"mm/d/yyyy") & "." & chr(13) & chr(10) &
    "Please direct any questions to DeptHead@compan y.com"

    You can then add other controls to display the rest of any information
    you wish to include in the letter, i.e. address, signature, etc.
    --
    Fred
    Please respond only to this newsgroup.
    I do not reply to personal e-mail

    Comment

    • RLN

      #3
      Re: Printing a form letter with Fields in Access


      This worked great Fred, thank you.


      *** Sent via Developersdex http://www.developersdex.com ***

      Comment

      • RLN

        #4
        Re: Printing a form letter with Fields in Access


        Fred, this solution you have here works well as mentioned earlier.
        While there are no immediate plans to modify this 'form letter', I could
        see the potential where the user would want this flexibility later on.
        As for a modifable solution the user could perform on this form letter,
        would it be better in your opinion to just create a Word doc as the form
        letter? Then the user could click a button that would invoke the Word
        object to change it. What do you think?

        *** Sent via Developersdex http://www.developersdex.com ***

        Comment

        Working...