Mail merge to Word using 1:m relationship

S

scubadiver

Hi folks,

I was pointed to the following to merge a current record to a Word document

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

I worked out how to do this on one database because my information source
was a single table.

For my current database, the source is a query that uses two tables with a
1:M relationship. The information from the "one" side is inserted into the
header of the document and the information from the "many" side is put into
the body of the document.

The problem I have is that the field in the "many" table is not being
recognised.

How do I deal with this?
 
S

scubadiver

I will add when I try to find the query in the mail merge set up it doesn't
get found
 
S

scubadiver

thanks,

I know about <<next record>>.

For some reason, when I open up the database source list in Word, the query
I want isn't there. Is it because it is based on two connecting tables?
 
D

Duane Hookom

I don't think joining two tables in a query should cause the query to not be
available from a Word merge. Is there anything special about your query? Are
all multiple table queries unavailable? What is the SQL of the query?
 
S

scubadiver

SELECT tble_jobs.JobID, tble_jobs.JobTitle, tble_jobs.Report,
tble_jobs.JobNo, tble_jobs.RevNo, tble_jobs.RevMnth, tble_jobs.RevYr,
tble_description.JDID, tble_description.Category,
tble_description.Description, Left([JobNo],2) AS FP, Right([JobNo],3) AS LP
FROM tble_jobs INNER JOIN (tble_description INNER JOIN tble_link ON
tble_description.JDID = tble_link.JDID) ON tble_jobs.JobID = tble_link.JobID
WHERE (((tble_jobs.JobTitle)=[forms]![tble_jobs]![jobtitle]));
 
S

scubadiver

thanks but I need a separate word document for 40 job titles!

I think what is happening with the code is that when I want to create a word
template, the code only recognises the table from the main form and uses the
table as the source not the query. That is why the template is not
recognising all the fields.

if that makes sense


Duane Hookom said:
You can create/apply criteria in Word. If you have Access open and can edit
data, then create a table with one record containing the JobTitle you want to
report. Use this table joined to tbleJobs.JobTitle in a saved query. This
will filter the query to just the one job title.
--
Duane Hookom
Microsoft Access MVP


scubadiver said:
Hello,

I haven't provided much clarification!

Each job title has many job descriptions and I only want those job
descriptions for a particular job title but since I don't have the parameter
I now get every row from the query.


Duane Hookom said:
I'm not sure how this works when you have a criteria from a control on a
form. Try remove the where clause.

--
Duane Hookom
Microsoft Access MVP


:


SELECT tble_jobs.JobID, tble_jobs.JobTitle, tble_jobs.Report,
tble_jobs.JobNo, tble_jobs.RevNo, tble_jobs.RevMnth, tble_jobs.RevYr,
tble_description.JDID, tble_description.Category,
tble_description.Description, Left([JobNo],2) AS FP, Right([JobNo],3) AS LP
FROM tble_jobs INNER JOIN (tble_description INNER JOIN tble_link ON
tble_description.JDID = tble_link.JDID) ON tble_jobs.JobID = tble_link.JobID
WHERE (((tble_jobs.JobTitle)=[forms]![tble_jobs]![jobtitle]));



:

I don't think joining two tables in a query should cause the query to not be
available from a Word merge. Is there anything special about your query? Are
all multiple table queries unavailable? What is the SQL of the query?
--
Duane Hookom
Microsoft Access MVP


:


thanks,

I know about <<next record>>.

For some reason, when I open up the database source list in Word, the query
I want isn't there. Is it because it is based on two connecting tables?


:

There are methods in Word of moving to the next record without creating a new
page/document. Otherwise you might be able to use the generic concatenate
function found at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane for your
MANY records.
--
Duane Hookom
Microsoft Access MVP


:


Hi folks,

I was pointed to the following to merge a current record to a Word document

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

I worked out how to do this on one database because my information source
was a single table.

For my current database, the source is a query that uses two tables with a
1:M relationship. The information from the "one" side is inserted into the
header of the document and the information from the "many" side is put into
the body of the document.

The problem I have is that the field in the "many" table is not being
recognised.

How do I deal with this?
 
D

Duane Hookom

I guess I'm not following your bigger picture. I don't know if you are
starting from Word or Access to begin your process. Also, I thought when
merging multiple records from Access to Word, it resulted in multiple
documents.

--
Duane Hookom
Microsoft Access MVP


scubadiver said:
thanks but I need a separate word document for 40 job titles!

I think what is happening with the code is that when I want to create a word
template, the code only recognises the table from the main form and uses the
table as the source not the query. That is why the template is not
recognising all the fields.

if that makes sense


Duane Hookom said:
You can create/apply criteria in Word. If you have Access open and can edit
data, then create a table with one record containing the JobTitle you want to
report. Use this table joined to tbleJobs.JobTitle in a saved query. This
will filter the query to just the one job title.
--
Duane Hookom
Microsoft Access MVP


scubadiver said:
Hello,

I haven't provided much clarification!

Each job title has many job descriptions and I only want those job
descriptions for a particular job title but since I don't have the parameter
I now get every row from the query.


:

I'm not sure how this works when you have a criteria from a control on a
form. Try remove the where clause.

--
Duane Hookom
Microsoft Access MVP


:


SELECT tble_jobs.JobID, tble_jobs.JobTitle, tble_jobs.Report,
tble_jobs.JobNo, tble_jobs.RevNo, tble_jobs.RevMnth, tble_jobs.RevYr,
tble_description.JDID, tble_description.Category,
tble_description.Description, Left([JobNo],2) AS FP, Right([JobNo],3) AS LP
FROM tble_jobs INNER JOIN (tble_description INNER JOIN tble_link ON
tble_description.JDID = tble_link.JDID) ON tble_jobs.JobID = tble_link.JobID
WHERE (((tble_jobs.JobTitle)=[forms]![tble_jobs]![jobtitle]));



:

I don't think joining two tables in a query should cause the query to not be
available from a Word merge. Is there anything special about your query? Are
all multiple table queries unavailable? What is the SQL of the query?
--
Duane Hookom
Microsoft Access MVP


:


thanks,

I know about <<next record>>.

For some reason, when I open up the database source list in Word, the query
I want isn't there. Is it because it is based on two connecting tables?


:

There are methods in Word of moving to the next record without creating a new
page/document. Otherwise you might be able to use the generic concatenate
function found at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane for your
MANY records.
--
Duane Hookom
Microsoft Access MVP


:


Hi folks,

I was pointed to the following to merge a current record to a Word document

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

I worked out how to do this on one database because my information source
was a single table.

For my current database, the source is a query that uses two tables with a
1:M relationship. The information from the "one" side is inserted into the
header of the document and the information from the "many" side is put into
the body of the document.

The problem I have is that the field in the "many" table is not being
recognised.

How do I deal with this?
 
D

Duane Hookom

I'm not sure how this works when you have a criteria from a control on a
form. Try remove the where clause.

--
Duane Hookom
Microsoft Access MVP


scubadiver said:
SELECT tble_jobs.JobID, tble_jobs.JobTitle, tble_jobs.Report,
tble_jobs.JobNo, tble_jobs.RevNo, tble_jobs.RevMnth, tble_jobs.RevYr,
tble_description.JDID, tble_description.Category,
tble_description.Description, Left([JobNo],2) AS FP, Right([JobNo],3) AS LP
FROM tble_jobs INNER JOIN (tble_description INNER JOIN tble_link ON
tble_description.JDID = tble_link.JDID) ON tble_jobs.JobID = tble_link.JobID
WHERE (((tble_jobs.JobTitle)=[forms]![tble_jobs]![jobtitle]));



Duane Hookom said:
I don't think joining two tables in a query should cause the query to not be
available from a Word merge. Is there anything special about your query? Are
all multiple table queries unavailable? What is the SQL of the query?
 
D

Duane Hookom

If you don't want to use an Access report then I believe this is a Word
question, not Access. There are at least 4 suggestions at
http://word.mvps.org/FAQs/MailMerge/index.htm. Click the link "How to list
multiple items using a single condition".
--
Duane Hookom
Microsoft Access MVP


scubadiver said:
There are 40 job titles and approximately 300 job responsibilities. Since
each responsibility can be applied to more than one job title I have 1472
rows.

I did try <<next record>>. Although it was inserting the one job title, it
was still listing all 1472 rows.

Duane Hookom said:
There shouldn't be an issue with "all the fields". Are you suggesting there
are fields in your query that don't display in your list of merge fields?

You stated earlier you were aware of the NEXTRECORD (or whatever) in Word to
create a report like document. Why didn't you follow that path?
--
Duane Hookom
Microsoft Access MVP


scubadiver said:
When you go for a job interview, you usually get given a document that has
the job title and all the listed responsibilities. I have designed a database
for my dad to hold this kind of information in order to produce such a
document but I need help.

I am starting this process from Access by using the following code:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

I am using a query based on two tables that have a 1:n relationship but
Albert's code (I think) assumes the source is a single table so the mail
merge template doesn't recognise all the fields I require.

What can I do to resolve this?

:

I guess I'm not following your bigger picture. I don't know if you are
starting from Word or Access to begin your process. Also, I thought when
merging multiple records from Access to Word, it resulted in multiple
documents.

--
Duane Hookom
Microsoft Access MVP


:


thanks but I need a separate word document for 40 job titles!

I think what is happening with the code is that when I want to create a word
template, the code only recognises the table from the main form and uses the
table as the source not the query. That is why the template is not
recognising all the fields.

if that makes sense


:

You can create/apply criteria in Word. If you have Access open and can edit
data, then create a table with one record containing the JobTitle you want to
report. Use this table joined to tbleJobs.JobTitle in a saved query. This
will filter the query to just the one job title.
--
Duane Hookom
Microsoft Access MVP


:


Hello,

I haven't provided much clarification!

Each job title has many job descriptions and I only want those job
descriptions for a particular job title but since I don't have the parameter
I now get every row from the query.


:

I'm not sure how this works when you have a criteria from a control on a
form. Try remove the where clause.

--
Duane Hookom
Microsoft Access MVP


:


SELECT tble_jobs.JobID, tble_jobs.JobTitle, tble_jobs.Report,
tble_jobs.JobNo, tble_jobs.RevNo, tble_jobs.RevMnth, tble_jobs.RevYr,
tble_description.JDID, tble_description.Category,
tble_description.Description, Left([JobNo],2) AS FP, Right([JobNo],3) AS LP
FROM tble_jobs INNER JOIN (tble_description INNER JOIN tble_link ON
tble_description.JDID = tble_link.JDID) ON tble_jobs.JobID = tble_link.JobID
WHERE (((tble_jobs.JobTitle)=[forms]![tble_jobs]![jobtitle]));



:

I don't think joining two tables in a query should cause the query to not be
available from a Word merge. Is there anything special about your query? Are
all multiple table queries unavailable? What is the SQL of the query?
--
Duane Hookom
Microsoft Access MVP


:


thanks,

I know about <<next record>>.

For some reason, when I open up the database source list in Word, the query
I want isn't there. Is it because it is based on two connecting tables?


:

There are methods in Word of moving to the next record without creating a new
page/document. Otherwise you might be able to use the generic concatenate
function found at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane for your
MANY records.
--
Duane Hookom
Microsoft Access MVP


:


Hi folks,

I was pointed to the following to merge a current record to a Word document

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

I worked out how to do this on one database because my information source
was a single table.

For my current database, the source is a query that uses two tables with a
1:M relationship. The information from the "one" side is inserted into the
header of the document and the information from the "many" side is put into
the body of the document.

The problem I have is that the field in the "many" table is not being
recognised.

How do I deal with this?
 
D

Duane Hookom

You can create/apply criteria in Word. If you have Access open and can edit
data, then create a table with one record containing the JobTitle you want to
report. Use this table joined to tbleJobs.JobTitle in a saved query. This
will filter the query to just the one job title.
--
Duane Hookom
Microsoft Access MVP


scubadiver said:
Hello,

I haven't provided much clarification!

Each job title has many job descriptions and I only want those job
descriptions for a particular job title but since I don't have the parameter
I now get every row from the query.


Duane Hookom said:
I'm not sure how this works when you have a criteria from a control on a
form. Try remove the where clause.

--
Duane Hookom
Microsoft Access MVP


scubadiver said:
SELECT tble_jobs.JobID, tble_jobs.JobTitle, tble_jobs.Report,
tble_jobs.JobNo, tble_jobs.RevNo, tble_jobs.RevMnth, tble_jobs.RevYr,
tble_description.JDID, tble_description.Category,
tble_description.Description, Left([JobNo],2) AS FP, Right([JobNo],3) AS LP
FROM tble_jobs INNER JOIN (tble_description INNER JOIN tble_link ON
tble_description.JDID = tble_link.JDID) ON tble_jobs.JobID = tble_link.JobID
WHERE (((tble_jobs.JobTitle)=[forms]![tble_jobs]![jobtitle]));



:

I don't think joining two tables in a query should cause the query to not be
available from a Word merge. Is there anything special about your query? Are
all multiple table queries unavailable? What is the SQL of the query?
--
Duane Hookom
Microsoft Access MVP


:


thanks,

I know about <<next record>>.

For some reason, when I open up the database source list in Word, the query
I want isn't there. Is it because it is based on two connecting tables?


:

There are methods in Word of moving to the next record without creating a new
page/document. Otherwise you might be able to use the generic concatenate
function found at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane for your
MANY records.
--
Duane Hookom
Microsoft Access MVP


:


Hi folks,

I was pointed to the following to merge a current record to a Word document

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

I worked out how to do this on one database because my information source
was a single table.

For my current database, the source is a query that uses two tables with a
1:M relationship. The information from the "one" side is inserted into the
header of the document and the information from the "many" side is put into
the body of the document.

The problem I have is that the field in the "many" table is not being
recognised.

How do I deal with this?
 
S

scubadiver

When you go for a job interview, you usually get given a document that has
the job title and all the listed responsibilities. I have designed a database
for my dad to hold this kind of information in order to produce such a
document but I need help.

I am starting this process from Access by using the following code:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

I am using a query based on two tables that have a 1:n relationship but
Albert's code (I think) assumes the source is a single table so the mail
merge template doesn't recognise all the fields I require.

What can I do to resolve this?

Duane Hookom said:
I guess I'm not following your bigger picture. I don't know if you are
starting from Word or Access to begin your process. Also, I thought when
merging multiple records from Access to Word, it resulted in multiple
documents.

--
Duane Hookom
Microsoft Access MVP


scubadiver said:
thanks but I need a separate word document for 40 job titles!

I think what is happening with the code is that when I want to create a word
template, the code only recognises the table from the main form and uses the
table as the source not the query. That is why the template is not
recognising all the fields.

if that makes sense


Duane Hookom said:
You can create/apply criteria in Word. If you have Access open and can edit
data, then create a table with one record containing the JobTitle you want to
report. Use this table joined to tbleJobs.JobTitle in a saved query. This
will filter the query to just the one job title.
--
Duane Hookom
Microsoft Access MVP


:


Hello,

I haven't provided much clarification!

Each job title has many job descriptions and I only want those job
descriptions for a particular job title but since I don't have the parameter
I now get every row from the query.


:

I'm not sure how this works when you have a criteria from a control on a
form. Try remove the where clause.

--
Duane Hookom
Microsoft Access MVP


:


SELECT tble_jobs.JobID, tble_jobs.JobTitle, tble_jobs.Report,
tble_jobs.JobNo, tble_jobs.RevNo, tble_jobs.RevMnth, tble_jobs.RevYr,
tble_description.JDID, tble_description.Category,
tble_description.Description, Left([JobNo],2) AS FP, Right([JobNo],3) AS LP
FROM tble_jobs INNER JOIN (tble_description INNER JOIN tble_link ON
tble_description.JDID = tble_link.JDID) ON tble_jobs.JobID = tble_link.JobID
WHERE (((tble_jobs.JobTitle)=[forms]![tble_jobs]![jobtitle]));



:

I don't think joining two tables in a query should cause the query to not be
available from a Word merge. Is there anything special about your query? Are
all multiple table queries unavailable? What is the SQL of the query?
--
Duane Hookom
Microsoft Access MVP


:


thanks,

I know about <<next record>>.

For some reason, when I open up the database source list in Word, the query
I want isn't there. Is it because it is based on two connecting tables?


:

There are methods in Word of moving to the next record without creating a new
page/document. Otherwise you might be able to use the generic concatenate
function found at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane for your
MANY records.
--
Duane Hookom
Microsoft Access MVP


:


Hi folks,

I was pointed to the following to merge a current record to a Word document

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

I worked out how to do this on one database because my information source
was a single table.

For my current database, the source is a query that uses two tables with a
1:M relationship. The information from the "one" side is inserted into the
header of the document and the information from the "many" side is put into
the body of the document.

The problem I have is that the field in the "many" table is not being
recognised.

How do I deal with this?
 
S

scubadiver

Hello,

I haven't provided much clarification!

Each job title has many job descriptions and I only want those job
descriptions for a particular job title but since I don't have the parameter
I now get every row from the query.


Duane Hookom said:
I'm not sure how this works when you have a criteria from a control on a
form. Try remove the where clause.

--
Duane Hookom
Microsoft Access MVP


scubadiver said:
SELECT tble_jobs.JobID, tble_jobs.JobTitle, tble_jobs.Report,
tble_jobs.JobNo, tble_jobs.RevNo, tble_jobs.RevMnth, tble_jobs.RevYr,
tble_description.JDID, tble_description.Category,
tble_description.Description, Left([JobNo],2) AS FP, Right([JobNo],3) AS LP
FROM tble_jobs INNER JOIN (tble_description INNER JOIN tble_link ON
tble_description.JDID = tble_link.JDID) ON tble_jobs.JobID = tble_link.JobID
WHERE (((tble_jobs.JobTitle)=[forms]![tble_jobs]![jobtitle]));



Duane Hookom said:
I don't think joining two tables in a query should cause the query to not be
available from a Word merge. Is there anything special about your query? Are
all multiple table queries unavailable? What is the SQL of the query?
--
Duane Hookom
Microsoft Access MVP


:


thanks,

I know about <<next record>>.

For some reason, when I open up the database source list in Word, the query
I want isn't there. Is it because it is based on two connecting tables?


:

There are methods in Word of moving to the next record without creating a new
page/document. Otherwise you might be able to use the generic concatenate
function found at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane for your
MANY records.
--
Duane Hookom
Microsoft Access MVP


:


Hi folks,

I was pointed to the following to merge a current record to a Word document

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

I worked out how to do this on one database because my information source
was a single table.

For my current database, the source is a query that uses two tables with a
1:M relationship. The information from the "one" side is inserted into the
header of the document and the information from the "many" side is put into
the body of the document.

The problem I have is that the field in the "many" table is not being
recognised.

How do I deal with this?
 
S

scubadiver

There are 40 job titles and approximately 300 job responsibilities. Since
each responsibility can be applied to more than one job title I have 1472
rows.

I did try <<next record>>. Although it was inserting the one job title, it
was still listing all 1472 rows.

Duane Hookom said:
There shouldn't be an issue with "all the fields". Are you suggesting there
are fields in your query that don't display in your list of merge fields?

You stated earlier you were aware of the NEXTRECORD (or whatever) in Word to
create a report like document. Why didn't you follow that path?
--
Duane Hookom
Microsoft Access MVP


scubadiver said:
When you go for a job interview, you usually get given a document that has
the job title and all the listed responsibilities. I have designed a database
for my dad to hold this kind of information in order to produce such a
document but I need help.

I am starting this process from Access by using the following code:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

I am using a query based on two tables that have a 1:n relationship but
Albert's code (I think) assumes the source is a single table so the mail
merge template doesn't recognise all the fields I require.

What can I do to resolve this?

Duane Hookom said:
I guess I'm not following your bigger picture. I don't know if you are
starting from Word or Access to begin your process. Also, I thought when
merging multiple records from Access to Word, it resulted in multiple
documents.

--
Duane Hookom
Microsoft Access MVP


:


thanks but I need a separate word document for 40 job titles!

I think what is happening with the code is that when I want to create a word
template, the code only recognises the table from the main form and uses the
table as the source not the query. That is why the template is not
recognising all the fields.

if that makes sense


:

You can create/apply criteria in Word. If you have Access open and can edit
data, then create a table with one record containing the JobTitle you want to
report. Use this table joined to tbleJobs.JobTitle in a saved query. This
will filter the query to just the one job title.
--
Duane Hookom
Microsoft Access MVP


:


Hello,

I haven't provided much clarification!

Each job title has many job descriptions and I only want those job
descriptions for a particular job title but since I don't have the parameter
I now get every row from the query.


:

I'm not sure how this works when you have a criteria from a control on a
form. Try remove the where clause.

--
Duane Hookom
Microsoft Access MVP


:


SELECT tble_jobs.JobID, tble_jobs.JobTitle, tble_jobs.Report,
tble_jobs.JobNo, tble_jobs.RevNo, tble_jobs.RevMnth, tble_jobs.RevYr,
tble_description.JDID, tble_description.Category,
tble_description.Description, Left([JobNo],2) AS FP, Right([JobNo],3) AS LP
FROM tble_jobs INNER JOIN (tble_description INNER JOIN tble_link ON
tble_description.JDID = tble_link.JDID) ON tble_jobs.JobID = tble_link.JobID
WHERE (((tble_jobs.JobTitle)=[forms]![tble_jobs]![jobtitle]));



:

I don't think joining two tables in a query should cause the query to not be
available from a Word merge. Is there anything special about your query? Are
all multiple table queries unavailable? What is the SQL of the query?
--
Duane Hookom
Microsoft Access MVP


:


thanks,

I know about <<next record>>.

For some reason, when I open up the database source list in Word, the query
I want isn't there. Is it because it is based on two connecting tables?


:

There are methods in Word of moving to the next record without creating a new
page/document. Otherwise you might be able to use the generic concatenate
function found at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane for your
MANY records.
--
Duane Hookom
Microsoft Access MVP


:


Hi folks,

I was pointed to the following to merge a current record to a Word document

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

I worked out how to do this on one database because my information source
was a single table.

For my current database, the source is a query that uses two tables with a
1:M relationship. The information from the "one" side is inserted into the
header of the document and the information from the "many" side is put into
the body of the document.

The problem I have is that the field in the "many" table is not being
recognised.

How do I deal with this?
 
D

Duane Hookom

There shouldn't be an issue with "all the fields". Are you suggesting there
are fields in your query that don't display in your list of merge fields?

You stated earlier you were aware of the NEXTRECORD (or whatever) in Word to
create a report like document. Why didn't you follow that path?
--
Duane Hookom
Microsoft Access MVP


scubadiver said:
When you go for a job interview, you usually get given a document that has
the job title and all the listed responsibilities. I have designed a database
for my dad to hold this kind of information in order to produce such a
document but I need help.

I am starting this process from Access by using the following code:

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

I am using a query based on two tables that have a 1:n relationship but
Albert's code (I think) assumes the source is a single table so the mail
merge template doesn't recognise all the fields I require.

What can I do to resolve this?

Duane Hookom said:
I guess I'm not following your bigger picture. I don't know if you are
starting from Word or Access to begin your process. Also, I thought when
merging multiple records from Access to Word, it resulted in multiple
documents.

--
Duane Hookom
Microsoft Access MVP


scubadiver said:
thanks but I need a separate word document for 40 job titles!

I think what is happening with the code is that when I want to create a word
template, the code only recognises the table from the main form and uses the
table as the source not the query. That is why the template is not
recognising all the fields.

if that makes sense


:

You can create/apply criteria in Word. If you have Access open and can edit
data, then create a table with one record containing the JobTitle you want to
report. Use this table joined to tbleJobs.JobTitle in a saved query. This
will filter the query to just the one job title.
--
Duane Hookom
Microsoft Access MVP


:


Hello,

I haven't provided much clarification!

Each job title has many job descriptions and I only want those job
descriptions for a particular job title but since I don't have the parameter
I now get every row from the query.


:

I'm not sure how this works when you have a criteria from a control on a
form. Try remove the where clause.

--
Duane Hookom
Microsoft Access MVP


:


SELECT tble_jobs.JobID, tble_jobs.JobTitle, tble_jobs.Report,
tble_jobs.JobNo, tble_jobs.RevNo, tble_jobs.RevMnth, tble_jobs.RevYr,
tble_description.JDID, tble_description.Category,
tble_description.Description, Left([JobNo],2) AS FP, Right([JobNo],3) AS LP
FROM tble_jobs INNER JOIN (tble_description INNER JOIN tble_link ON
tble_description.JDID = tble_link.JDID) ON tble_jobs.JobID = tble_link.JobID
WHERE (((tble_jobs.JobTitle)=[forms]![tble_jobs]![jobtitle]));



:

I don't think joining two tables in a query should cause the query to not be
available from a Word merge. Is there anything special about your query? Are
all multiple table queries unavailable? What is the SQL of the query?
--
Duane Hookom
Microsoft Access MVP


:


thanks,

I know about <<next record>>.

For some reason, when I open up the database source list in Word, the query
I want isn't there. Is it because it is based on two connecting tables?


:

There are methods in Word of moving to the next record without creating a new
page/document. Otherwise you might be able to use the generic concatenate
function found at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane for your
MANY records.
--
Duane Hookom
Microsoft Access MVP


:


Hi folks,

I was pointed to the following to merge a current record to a Word document

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html

I worked out how to do this on one database because my information source
was a single table.

For my current database, the source is a query that uses two tables with a
1:M relationship. The information from the "one" side is inserted into the
header of the document and the information from the "many" side is put into
the body of the document.

The problem I have is that the field in the "many" table is not being
recognised.

How do I deal with this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top