create index and mail merge

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ljungers
    New Member
    • Dec 2006
    • 114

    create index and mail merge

    I’m a Access newbie. Have a ASCII flat file that is tab delimited. Access imports this file without any problems. I need to create a key field using data found in another text field. The field was created by an old application that placed an order number in the field (exam: “Order #: 123456”) and is not static as to location within that field.

    Could someone tell me how and what I should do to solve this or steer me to documentation.

    Also need to find example of script/instruction on how to feed Word with selected keys from a query using this Access database and print a mail merge document filled in using a basic template.

    Thanks in advance
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32633

    #2
    Originally posted by ljungers
    I’m a Access newbie. Have a ASCII flat file that is tab delimited. Access imports this file without any problems. I need to create a key field using data found in another text field. The field was created by an old application that placed an order number in the field (exam: “Order #: 123456”) and is not static as to location within that field.

    Could someone tell me how and what I should do to solve this or steer me to documentation.

    Also need to find example of script/instruction on how to feed Word with selected keys from a query using this Access database and print a mail merge document filled in using a basic template.

    Thanks in advance
    Is the field that contains the OrderNumber always the same?
    What do you know about the contents - what can be used to identify which part of the field is OrderNo and which is not?

    Comment

    • ljungers
      New Member
      • Dec 2006
      • 114

      #3
      Yes the field that contains the OrderNumber is always the same. It is within a memo field. The order number is always preceded with the text "Order Number : " followed by six numeric characters that make up the order number. For some reason the order number was not a tab delimited field but was placed within this memo area, why I don't know.

      That info in that area can be left there, I just want to pick it up and create a field that I can use as a key.

      Comment

      • NeoPa
        Recognized Expert Moderator MVP
        • Oct 2006
        • 32633

        #4
        I should be able to help here with something but tied up working atm.
        If you can wait, I'll look at it later today.

        Comment

        • ljungers
          New Member
          • Dec 2006
          • 114

          #5
          No problem, would like to work with it on Wednesday if that OK. Thanks much

          Comment

          • NeoPa
            Recognized Expert Moderator MVP
            • Oct 2006
            • 32633

            #6
            Assuming the memo field is named MemoField then you want something like :
            Code:
            SELECT Mid([MemoField],InStr(1,Nz([MemoField],''),'Order Number : ')+15,6) AS OrderNumber
            FROM ...
            Don't have any info for the rest so you'll have to add my bits into your own query.

            Comment

            Working...