updatable link to MS Access field ?

W

ward

Hello,

BRIEF DESCRIPTION:
How can I insert in Word a 'dynamic' link to a particular
field in an Access Database?

LONG DESCRIPTION:
We're faced with the following issue for a big
documentation project.

Basically, the project would consist of maintance
documentation which would be stored in:
- several hundreds of Word files, containing descriptions,
removal procedures, etc.
- an Access database containing (among other things) a
table with 2 fields: ToolNumber and ToolDescription.

In the Word documents, we would like to insert one or more
tool numbers and tool descriptions, as retrieved from the
database. For example, through some Word VBA form, the
author would selected tool number "T103" and at the
current position in his document this tool number "T103"
and corresponding description "Torque wrench M=30 Nm"
would be inserted.

The problem is that we want this to be 'dynamic': if the
description of the tool is changed in the Database, then
the description should change in the Word document as well.
Either upon opening of the Word document or after some
kind of command (e.g. F9 or VBA macro, or ...)

My idea is upon inserting in Word to put the tool number
text and description text in a specific style
(e.g. "ToolStyle") and write a Word VBA application that
will:
- scan the document for this style,
- look up the toolnumber in the Access Database,
- retrieve the (new) description,
- and (if changed) replace the old description in Word.

I'm not sure this is the best possible solution.

Does anybody has some easier or/and more bulletproof
or/and non-VBA solutions, that will do the job?
Maybe a special Word field exist to link Database fields?

Really appreciating any thoughts and ideas,
Ward
 
W

ward

Please refer to the article at
http://office.microsoft.com/assistance/preview.aspx? AssetID=HP051862061033&CTT=4&Origin=CH061047251033.

Regards,
Chad

That's what i needed!
I must have overlooked the existence of the DATABASE Field.
thanks Chad!


Two additional questions:

1° When my query outputs just one field; I can not use
this field in a table( "error: not a valid result for a
table"). Anybody knows why, and how i can use the result
in a table?

2° Is there a way to make some text of the query in the
field to be the result of a bookmark somewhere else in my
Word document?

E.g. the query switch in the field is:
\s "SELECT `ToolDescription` FROM `Parts` WHERE
((`ToolNumber` = 888))"

I would like the "888" to be the text from within a
bookmark, e.g. with the name "BookMarkDummy".
I would expect something in the field like:

\s "SELECT `ToolDescription` FROM `Parts` WHERE
((`ToolNumber` = " & BookMarkDummy & "))"

but of course this does not work.
Any ideas?
 

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