Extract info from Acc2003 and insert into a Word document at a specific point

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • donovans
    New Member
    • Oct 2007
    • 21

    #16
    Thanks,

    I'll try that and let you know how it goes. I hope I can get this right now :)
    Shot for all the help so far.

    Kindest Regards,
    Donovan

    Comment

    • donovans
      New Member
      • Oct 2007
      • 21

      #17
      Joy, I pulled my first report yesterday and it is working like a charm :) Thank you so much for all the brilliant advice.

      But....

      Now there is another problem...When I have more than one dataset in the database, ie. more than one row, it looks like when I do a mailmerge, it carries on looping between the two or more datasets and creating all those reports over and over. If the report is about 8 pages, it ends up being about 2,500 pages long....

      Any ideas about this?

      Thanks,
      Donovan

      Comment

      • nico5038
        Recognized Expert Specialist
        • Nov 2006
        • 3080

        #18
        Strange, did you check or the query does deliver the rows properly ?
        I get the impression you get a "Cartesian" product, but a UNION query shouldn't suffer from that.

        Is the number of copies for the Word document = 1 ?

        Nic;o)

        Comment

        • donovans
          New Member
          • Oct 2007
          • 21

          #19
          Hey there,

          I feel like a bit of a nut now...it was an error in my program to begin with...but it is sorted now :)

          I now am heading toward my final stretch...all I need to sort out now is the following: When I enter data into the table, from the program I created, the table get's sorted alphabetically by default...howev er, this is not good in an 11 table environment as I need the information inserted to remain the same throughout the tables ie. row one must be row one in all the tables, row two must be row two in all the tables etc. If I can get this working, I will have my program finished :) At long last.

          Do you have any ideas? Please save me ... hahaha

          Thanks and Regards,
          Donovan

          Comment

          • nico5038
            Recognized Expert Specialist
            • Nov 2006
            • 3080

            #20
            Use a UNION like:
            [code=sql]
            select "1" as tableno, * from table1
            UNION ALL
            select "2" as tableno, * from table2
            UNION ALL
            select "3" as tableno, * from table3
            ...etc
            ORDER BY 1, 2
            [/code]

            The ALL is needed, and the added field Tableno will sort the table's in sequence for the added number and the first column of the table. Just make sure that the first table field is the unique ID in sequence needed.

            Nic;o)

            Comment

            • donovans
              New Member
              • Oct 2007
              • 21

              #21
              Another question please...is there a way to automatically populate all the fields in a database that share a name with the information in one table through to the different tables?

              Comment

              • nico5038
                Recognized Expert Specialist
                • Nov 2006
                • 3080

                #22
                No. Normally this requirement points to the recording of redundant data and that's a "DON'T" in a normalized database.

                Nic;o)

                Comment

                • donovans
                  New Member
                  • Oct 2007
                  • 21

                  #23
                  Hey there,

                  Shot for all the help, you have been a life saver and hopefully one day I can help aswell. My program is running perfectly and I have completed my project to present on Monday :)

                  Thanks again and Have a good one,
                  Kindest Regards,
                  Donovan

                  Comment

                  Working...