473,473 Members | 2,286 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Query and Merge

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 Query can be used in mail merge in Word

Jun 4 '07 #1
2 1892
I think your explanation is about right....

A possible solution is to use my word merge sample.

my "super easy word merge" can be found here:
http://www.members.shaw.ca/AlbertKal.../msaccess.html

the above sample also has the same problem, but you can easily ask for the
parameter in code.

eg:

dim strSql as string

strSql = "Select * from tblCustomers where city = 'Edmonton'"

MergeAllWord strSql

The above sends all names from the tblCustomers from my city. To make a
prompt. you could go

dim strSql as string
dim strCity as string

strSql = "Select * from tblCustomers"

strcity = inputbox("what city")

if strCity <"" then
strSql = strSql & " where city = '" & strity & "'"
end if

MergeAllWord strSql

So, you can use my example to add parameters, but you have to write some
code.
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com
Jun 4 '07 #2
I haven't been able to do that. What I do is, instead of using a parameter
query, either: a) write the restricting data (such as list of primary keys
or whatever) to a temporary table, and join that table to the other table in
the query with an inner join; or b) write all the data for the merge to a
temporary table and just base the merge on that temporary table's data.
"zazu" <mi***********@gmail.comwrote in message
news:11**********************@i38g2000prf.googlegr oups.com...
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 Query can be used in mail merge in Word

Jun 4 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Bob | last post by:
Hi there, Need a little help with a certain query that's causing a lot of acid in my stomach... Have a table that stores sales measures for a given client. The sales measures are stored per...
7
by: Egor Shipovalov | last post by:
I'm implementing paging through search results using cursors. Is there a better way to know total number of rows under a cursor than running a separate COUNT(*) query? I think PostgreSQL is bound...
2
by: Yonatan Goraly | last post by:
I have a query that uses the same view 6 times. It seems that the database engine is calculating the view each time. The result is very poor performance. The same query takes 2 sec with MS SQL,...
1
by: Lisa | last post by:
I have a query named QryDept where one of the fields is DeptID. The query is used for the data source of a mail merge letter. I would like to control which department is to get the mail merge...
1
by: Tom Keane | last post by:
Hi, I need some helpings again! I have a query from one of my tables that gets a total amount of money and gets a percentage from it ie, the field I create in the query is invGSTAmount from a...
1
by: maiden_moon | last post by:
I need to take specific data from a access db and merge it with a word doc. I know how to do the general mail merge using access and word, but for this I need the user to enter peramiters for the...
0
by: Phil C. | last post by:
Hi, I'm using Access 2000. I have a Select Query that uses the MID function to separate the actual text of articles from the title of the articles. The articles are enterd into the...
8
by: babyangel43 | last post by:
Hello, I have a query set up in Access. I run it monthly, changing "date of test". I would like this query to be merged with a Word document so that the cover letter is created in Word, the fields...
16
by: Sam Durai | last post by:
Hello, I need to merge a small table (of rows less than 100,sometimes even 0 rows) to a big table (of rows around 4 billion). I used the PK of the big table as merge key but merge does a table scan...
0
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,...
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...
1
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,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
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...

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.