Inserting an Access db query

J

Judy Ward

I have an Access database query that I am trying to insert into a Word
document. When I try to "Insert data as field" I get this message: "This
operation cannot be completed because of dialog or database engine failures.
Please try again later."

When I do not check "Insert data as field" I can see the table in my Word
document, but one of the fields has a lot of "?"s in place of the expected
data. The field that is causing the problem is a field that calls a function
that concatonates several fields together.

I can export this same query to an .rtf and do not get the strange output of
"?"s.

I would apprecate any suggestions as to what I can do to link this query to
the Word document so that it will update.

Thank you,
Judy
 
C

Cindy M.

Hi =?Utf-8?B?SnVkeSBXYXJk?=,
I have an Access database query that I am trying to insert into a Word
document. When I try to "Insert data as field" I get this message: "This
operation cannot be completed because of dialog or database engine failures.
Please try again later."

When I do not check "Insert data as field" I can see the table in my Word
document, but one of the fields has a lot of "?"s in place of the expected
data. The field that is causing the problem is a field that calls a function
that concatonates several fields together.
The problem is likely the function (a custom VBA function?). These can only
execute if a DDE connection is made, which has Access actually running. I can
tell you how that can be done, if I know the version of Word you're using.

The other possibilty would be to do the concatenation as a query "field". Sort
of like this:
Multiplefields: [field a] & ", " & [field b]

Where Multiplefields would be the field name you'd see in the table. Everything
after the colon :)) would be the table content.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
J

Judy Ward

Thank you for responding.

It was pointed out to me that the "?"s appear after about 240 characters of
data in the field. I believe my problem is related to the fact that Word is
expecting a text field and this field ends up being a memo field. I'm using
Word 2003 SP2.

The workaround I have come up with is to create a table with the query and
have Word link to this table (which declares the field as a memo field). I
can make it "user friendly" to click a button that will clear out the table
and run the query over again to get the latest and greatest.

I would love to hear about any solutions with Word and/or Excel and memo
fields no longer being truncated.

Thank you,
Judy

Cindy M. said:
Hi =?Utf-8?B?SnVkeSBXYXJk?=,
I have an Access database query that I am trying to insert into a Word
document. When I try to "Insert data as field" I get this message: "This
operation cannot be completed because of dialog or database engine failures.
Please try again later."

When I do not check "Insert data as field" I can see the table in my Word
document, but one of the fields has a lot of "?"s in place of the expected
data. The field that is causing the problem is a field that calls a function
that concatonates several fields together.
The problem is likely the function (a custom VBA function?). These can only
execute if a DDE connection is made, which has Access actually running. I can
tell you how that can be done, if I know the version of Word you're using.

The other possibilty would be to do the concatenation as a query "field". Sort
of like this:
Multiplefields: [field a] & ", " & [field b]

Where Multiplefields would be the field name you'd see in the table. Everything
after the colon :)) would be the table content.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)


This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top