C
cjg.groups
Hello, I've been searching the newsgroups for these answers for days
but have run out of time. Any help would be appreciated.
How can I merge a query based on only the current record displayed on
an Access 2003 form to a Word 2003 mail merge file? This article
helped http://support.microsoft.com/?id=209976 . When I add a WHERE
clause such as the following, the query is no longer available as a
data source to Word:
WHERE ((Orders.OrderID)=[Forms]![OrderForm]![OrderID]);
In the MergIt function (above, from Microsoft), can OpenDataSource
limit the query to the current record? Currently, it only uses:
Connection:="QUERY qrySamplingRequestForm"
Could I use SQLStatement as "Select * WHERE
OrderID=Form!OrderForm!OrderID" ?
Then, I need to translate evil lookup table values from Access to look
good in Word. What is the SQL code to do the lookup that these tables
do automatically? ie: Orders table stores MuniCode number which
coresponds to a name in the Muni table. How to translate that number
to a name in the SQL mailmerge population query?
Last, I need to add calculations and conditionals to my query, ie:
outputting either a database field or text constant based on the field
value. Should these calculations and conditionals be in the SQL query,
and if so, how does that look? Or should they be in VB code which
creates a VB query, and if so, how can I base a Word query on a
code-generated query? Or should they be in the Word document using IF
mergefields like this -
http://word.mvps.org/FAQs/MailMerge/MMergeIfFields.htm , though this is
very inflexible.
Thank you very much for your help. Newsgroups have helped me create a
very functional database from scratch with no Access knowledge, and I
am very grateful.
but have run out of time. Any help would be appreciated.
How can I merge a query based on only the current record displayed on
an Access 2003 form to a Word 2003 mail merge file? This article
helped http://support.microsoft.com/?id=209976 . When I add a WHERE
clause such as the following, the query is no longer available as a
data source to Word:
WHERE ((Orders.OrderID)=[Forms]![OrderForm]![OrderID]);
In the MergIt function (above, from Microsoft), can OpenDataSource
limit the query to the current record? Currently, it only uses:
Connection:="QUERY qrySamplingRequestForm"
Could I use SQLStatement as "Select * WHERE
OrderID=Form!OrderForm!OrderID" ?
Then, I need to translate evil lookup table values from Access to look
good in Word. What is the SQL code to do the lookup that these tables
do automatically? ie: Orders table stores MuniCode number which
coresponds to a name in the Muni table. How to translate that number
to a name in the SQL mailmerge population query?
Last, I need to add calculations and conditionals to my query, ie:
outputting either a database field or text constant based on the field
value. Should these calculations and conditionals be in the SQL query,
and if so, how does that look? Or should they be in VB code which
creates a VB query, and if so, how can I base a Word query on a
code-generated query? Or should they be in the Word document using IF
mergefields like this -
http://word.mvps.org/FAQs/MailMerge/MMergeIfFields.htm , though this is
very inflexible.
Thank you very much for your help. Newsgroups have helped me create a
very functional database from scratch with no Access knowledge, and I
am very grateful.