Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Nathan Franklin Nathan Franklin is offline
external usenet poster
 
Posts: 2
Default 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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mailmerge and Access Steve P. Mailmerge 2 May 25th 06 05:02 PM
Mailmerge picture from an Access Database Rick Microsoft Word Help 1 April 4th 06 05:48 AM
Word Mailmerge with Access via DDE Jim Gilligan Mailmerge 0 November 22nd 05 01:21 PM
Mailmerge Query - Works in Access; fails in Word Gary Stark Mailmerge 4 October 6th 05 07:57 PM
How to use access query computed fields in Word mailmerge Rey Mailmerge 5 June 23rd 05 06:26 PM


All times are GMT +1. The time now is 05:59 AM.

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"