How do I merge a Access 2007 Parameter Query into Word 2007 Labels?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • brat33
    New Member
    • Jan 2010
    • 36

    How do I merge a Access 2007 Parameter Query into Word 2007 Labels?

    I am trying to modify some code to create a mail merged label document within Word 2007, using a Access 2007 Parameter Field. My issue comes about when I cannot see the Parameter Query within the selecting list in Word. I would rather not have 40 queries for each year we are pulling, so I want to use the parameter query to simplify things.
    I have thought using a Temp. Table and pulling from there - but have no clue as to how to go about that one either. I am still researching that option. I would rather get the Parameter Query to be recognized in Word as it seems to be easier (or so I thought). Thank you for any help anyone may be able to offer. AND - if I happened to miss the answer to this in a past post - I tried to go through many of the past questions.
  • nico5038
    Recognized Expert Specialist
    • Nov 2006
    • 3080

    #2
    I guess the parameter is the Year.
    In a case like that you could create a tblParameter holding the field Year and place by code the needed Year(s) as rows in the table. Now JOIN the Year field from the original table with this table and I guess the query will be visible in Word.

    The needed code for the table filling behind a form with the YearValue field is:
    Code:
    currentdb.execute ("delete * from tblParameter" )
    currentdb.execute ("INSERT INTO tblParameter (YearValue) VALUES (" & Me.YearValue & ")")
    Don't use "Year" as the fieldname as that's also a function !

    Nic;o)

    Comment

    • brat33
      New Member
      • Jan 2010
      • 36

      #3
      Have this resolved...Than k you for your reply! I appreciate it...

      Comment

      Working...