Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
mailmerge with access
Hello Guys,
I am struggling with this. I am trying to mail merge using a query from ms access. I am linking tables from another database on the server and then setting the datsource mailmerge to this datbase. The problem when i use the replace function in ms access in my sql query it causes an error to come up in microsoft word. I have tested this over and over and can reproduce or get rid the problem every time through use or no use of the replace function The error message is "This operation cannot be completed because of dialog or database engine failures.Please try again later." My sql statement is SELECT FirstName & ' ' & LastName AS Purchaser, replace(PropertyAddress,Chr(13),'') AS Property_address, '#' & right('000000000' & InvoiceID,5) AS Invoice, ReportFirstName & ' ' & ReportLastName AS Requested_by, Address AS Address_1, PhoneNumber & ' ' & MobileNumber AS Phone, DatePart('d',DateInspected) & '/' & DatePart('m',DateInspected) & '/' & DatePart('yyyy',DateInspected) AS Date_of_inspection, FaxNumber AS Fax, '' AS Vendor, '' AS Age, (Select DatePart('d',DateCreated) & '/' & DatePart('m',DateCreated) & '/' & DatePart('yyyy',DateCreated) From invoices Where ID = inspections.InvoiceID) AS Invoice_date FROM inspections; special attention on replace(PropertyAddress,Chr(13),'') AS Property_address I have even tried '' & replace(PropertyAddress,Chr(13),'') AS Property_address to force a text field, but word still spits the dummy. Could someone please help me solve this. Thanks! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mailmerge and Access | Mailmerge | |||
Mailmerge picture from an Access Database | Microsoft Word Help | |||
Word Mailmerge with Access via DDE | Mailmerge | |||
Mailmerge Query - Works in Access; fails in Word | Mailmerge | |||
How to use access query computed fields in Word mailmerge | Mailmerge |