The original
article, which appears in Computor
Companion magazine, mentions that
you can find, here, more detailed information
regarding connecting your Word autoforms
to a database. Below you can download my
sample form, sample connected database and
source code.
A very
good first book for learning and understanding
ADO connectivity (the technology you use for
connecting your forms to databases) is ADO
for Dummies. You'll find a link to purchase
this book on our Book
Recommendation page.
You can also
find more tutorial info by going to a terrific
learning site. The World Wide
Web Consortium (the committee that oversees
Internet development protocols) has several
tutorials, one of which is on the ActiveX Data
Object (ADO). Go to our Resources page to
see more information about the www.W3Schools.com site.
Below is
a link to download a zip file containing
the sample form used in this article along
with the embedded source code shown in the
article and the sample database.
Download
Sample Form with Code & Database
[zipped
40 kb file]
You
should be able to click the above download
link to begin the download process. If, for
any reason, you're having trouble downloading
with a direct click, right click the link above.
A mini menu will appear. Choose Save Target
As and pick a location on your hard drive
where you want to put this zip file.
Note! If
you want to use the sample form right away
to see how it works, without having to change
the path information in the embedded VBA
code, then create a new directory called c:\ComputorCompanion and
save the files into that directory, as that's
the path in the current code. If you save
the files to another directory, you'll have
to revise the code path information in both
the CommandButton1 and CommandButton2 codes,
before the form will connect to the database.
Once
downloaded, locate the FormsFive.zip file
and double click it to unzip the two files
encased in
the zip file.
Open
the sample form in Microsoft Word and hit
Alt/F11 to view the code.
Open the .mdb (database) file in Access 2000
to view it.
Set
your reference to ADO, as mentioned
in the original
article, verify that the path in the
code is correct (set to c:\computorcompanion
or to your new path, if you saved the files
elsewhere) and you should be able to enter
information into the form fields and then
click the buttons on the form to either check
the database for its existence or enter
the new name into the database.
Good luck.