Hi =?Utf-8?B?REdqci4=?=,
I have neither DAO or ADO. I'd like to think I could figure some of it out on
the fly though if the code is straight forward enough.
IF you have Access, you have DAO and ADO. These are the protocols for working
directly with the datasets; DAO (Data Access Objects) is Access "native" one;
ADO (ActiveX Data Objects) is more generally applicable (replaces ODBC).
have a form that I'd like to have
automatically save both the form (as designed), and also push the data to an
access database.
Well, the basic syntax for passing the data is
rs.Fields("name").Value = doc.Formfields("name").Result
But before you can use that, you have to understand how to build a connection
to the table (recordset) in a database, and loop through its contents. You'll
find a sample file - WdAcc97.zip - in the mail merge section of my website that
shows how to transfer data between Access and Word using VBA. It doesn't deal
with forms, but it will show you how to connect to an Access database/table,
create a recordset, loop through it, and pass in data. Once you understand how
that works, you can use the line of code above to make it work with formfields.
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
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
