Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2002
    Location
    London
    Posts
    73

    Unanswered: Choosing different records and filling in missing information

    I am trying to add text from one field from another field in ms access 2000 using VBA.

    Basically i have a table called tblLetters, with field names as
    LetterId (Number)
    Letter (Memo)
    Name (Text)
    Address (Memo)
    Postcode (Text)

    For the field letter i have differet templates eg

    Letter Id 1

    Dear xxxxx (name)

    Thankyou for your call.

    Letter ID 2

    Dear xxxx (name)

    Your tracking number is xxxxx (trackingnumber), will let you know when dispatch

    Letter Id 3


    Dear xxxx

    Is this your correct address : xxxxxxxxxxxxxxxx (billing address and postcode). If not please can you send us your details


    Basically what i'm trying to do in code is from the letter ID determine what letter and information to put in. So if it was letter Id i would like to add the name on to the field after Dear.

    Is there a way in code which selects each letter and puts in the missing information.

    I appreicate your help

    Thank you

  2. #2
    Join Date
    Jan 2007
    Location
    UK
    Posts
    11,434
    Provided Answers: 10
    What you want is oftern referred to as a "Mail Merge".

    Ok, on to the problem.
    As I see it, you have a couple of problems and you are trying to attack the problem in the wrong way... Did you know that you can build reports within Access? Perhaps you should take a look at those and create your templates that way.

    One of the biggest problems here is your table setup - namely the pesky memo fields. These will no doubt cause you problems in the future.
    George
    Home | Blog

Posting Permissions

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