473,654 Members | 3,040 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

36 New Member
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 3516
nico5038
3,080 Recognized Expert Specialist
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 New Member
Have this resolved...Than k 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
3069
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 query runs. I think it might have something to do with the source document mailmerge.doc. Could it be that I'm trying to run the query from
8
9511
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 each person for whom a mail merge letter is desired. The query reads address info from the table for each record where is true.
3
5578
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 document in Word; 2. opens the document and runs the merge process for the new data. I have managed to write the code to perform step 1 ok, but I'm having trouble with step 2. It opens the word document fine but does not perform the mail merge of...
2
9341
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 = <<Query_Name>> Once I create the report, I m trying to create labels to display the Report title in the Report Header section.
2
2829
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 query and this is working fine. (Ex/ MonthName(+1)&" 1, 2007). Issue is I'm then using a MS Word Mail Merge to look at this query and pull in the date. Word doesn't seem to like the MonthName function so won't even display the query when I...
7
7234
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 for any comments about the use of the docmd.transfertext method instead of the code Albert used for creating the text file. Also, perhaps some ideas for coding the Subject Line of each email so
2
1903
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 Data Source window this query did not appear in the list of Access tables. Deleted the parameter and reverted to Select query and there it is in the Data Source window. Can any body explain this please and also comment on whether a parameter...
1
6543
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!) upgraded from Access 2000 to Access 2007. Now that component is failing. The merge is building the data source file fine (text file named merge.888). I am providing an absolute path reference to the word file being used for the mail merge. ...
2
2152
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 connection working using both a file dsn and a machine dsn. I am currently using a simple test merge template with fields <<FirstName>> (a nvarchar) <<Id>> (an int primary key).....plus a <<NextRecord>> field. The template doc itself has no data source...
1
5050
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 very little (actually probably nothing) about VBA and I'm currently learning my way around Access. Basically, I want to click a button in the form that merges the letter for me, only for the one record I'm currently viewing..not the whole...
0
8290
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8815
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8707
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8482
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8593
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7306
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
1593
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.