473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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

36
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.
Jan 25 '10 #1
2 3502
nico5038
3,080 Expert 2GB
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:
Expand|Select|Wrap|Line Numbers
  1. currentdb.execute ("delete * from tblParameter" )
  2. currentdb.execute ("INSERT INTO tblParameter (YearValue) VALUES (" & Me.YearValue & ")")
  3.  
Don't use "Year" as the fieldname as that's also a function !

Nic;o)
Jan 25 '10 #2
brat33
36
Have this resolved...Thank you for your reply! I appreciate it...
Feb 15 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Lynn A. | last post by:
Access/Word 2000 I am trying to merge a word document with an access query that has a parameter attached to it. Could someone please suggest how to stop the parameter from appearing when the...
8
by: Squirrel | last post by:
Hi everyone, I've created a mail merge Word doc. (using Office XP) , the data source is an Access query. Functionality I'm attempting to set up is: User sets a boolean field to true for...
3
by: Andy Davis | last post by:
I have set up a mail merge document in Word 2003 which gets its data from my Access 2000 database. I want to set up a button on a form that: 1. runs the query to provide the dat for the merge...
2
by: amith.srinivas | last post by:
Hi all, From a word macro in VBA, I am trying to create a report in access DB. The report is based on a query with a parameter. I am using Set rpt = Application.CreateReport rpt.RecordSource =...
2
by: veaux | last post by:
I have single integers representing a month (i.e. 2) and need to convert this to (March 1, 2007). So "2" represents really the end of the previous month. I'm using MonthName and adding 1 in my...
7
by: giladp1 | last post by:
I found Albert Kallal's great "Super easy Word Merge" code in his site at: http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html Thanks Albert so much for sharing this. I am looking...
2
by: zazu | last post by:
We have a query which is used as a mail merge source in Word. No problem. However we made it a parameter query and when trying to establish the link between the query and the word document in the...
1
by: Esther Lane | last post by:
Hello! First off, many many thanks to Albert who wrote the Mail Merge code for MS Access I am using. It has been working beautifully for a few years. However, my client just (without notice!)...
2
by: JeffN825 | last post by:
Hello, Thank you in advance for any assistance. I am trying to set up a mail merge from VB6/VBA code with Word 2000 using an ODBC data source (SQL 2000). I have successfully gotten the...
1
by: kayberrie | last post by:
I want to write a VBA mail merge code. I want to link the code/macro/dohicky to a nifty little button so it makes life easy. I think I can handle the button part, the code part - not so much. I know...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.