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?