Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Alex Alex is offline
external usenet poster
 
Posts: 86
Default CHange query/datasource mail merge is bound to

Hi i have set up a mail merge document, and set the datasource to a query in
my access 97 database. This works fine. The problem is that i need to change
a parameter in the query, based on what record the user is currently looking
at. So i need to change the carNo = 1 part of my SQL :-

Code:
SELECT carNo, dateRaised, dateCARsent, e.fullName, b.supplierName, 
c.materialCode, suppOrderNo, ProductionDate, DeliveryDate, originIsCustomer, 
complaintNo, a.defectDesc, fsqOrderNo, holdNo, deliveryQty, f.defectDesc, 
machineTimeLost, scrapIncurred, supplierResponse, suppResponse, briefDesc, 
defectLocation, defectComments, setupOK, setupComments, sampleYN, 
sampleComments, testMethod, results, graphAtc, spreadAtc, chkAgainstSpec, 
specNo, specComments, conclusion
FROM tblCAR AS a, tblSupplier AS b, tblMaterial AS c, tblMaterialSupplier AS 
d, tblUser AS e, tblDefect AS f, tblDefectLocation AS g
WHERE a.MaterialSupplierId=d.materialSupplierId
AND b.supplierId = d.supplierId
AND c.materialID = d.materialID
AND a.UserId = e.userId
AND a.defectId = f.defectId
AND a.defectLocId = g.defectLocId
AND CARNO = 1;
Can i change this is access? Or on the the other side of things is it better
to build the query in vb.net and pass that through to the document - but that
poses me the problem of how i set the query created in vb to be the
datasource of the document.

Any ideas, suggestions most welcome,

Cheers,
Alex
 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
NO CODE - mail merge to Outlook with attachment with CC BrianH Mailmerge 1 February 10th 10 02:53 PM
Heavy Mail Merge Application Atul Mailmerge 1 August 17th 06 02:37 PM
Change font for one field in mail merge BeckyLou Mailmerge 1 April 5th 06 07:07 AM
Why does mail merge change the numbers in excel PayPal Resolution Services Mailmerge 1 April 4th 06 06:31 AM
mail merge with word 2003 ken sunshine New Users 5 March 23rd 06 05:01 PM


All times are GMT +1. The time now is 02:27 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"