N
Nathan Franklin
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!
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!