I have a Word document that is filled with data. I set up a button o
the document where the user is supposed to click on the button and ru
VBA code. The code is supposed to open an access database and run
select query and then insert new data into the access database. Th
database is in the same directory as the document. I am limited t
starting it from Word with the button. The button works and runs th
VBA. I just don't know what to use to get the database open an
queried. Help would be greatly appreciated. thanks
--
smdesq1
Posted from - http://www.officehelp.i
smdesq13 was telling us:
smdesq13 nous racontait que :
> I have a Word document that is filled with data. I set up a button on
> the document where the user is supposed to click on the button and run
[quoted text clipped - 4 lines]
> VBA. I just don't know what to use to get the database open and
> queried. Help would be greatly appreciated. thanks.
This might be better posted in an access group.

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Take a look at the last of the following series of articles:
Please Fill Out This Form
Part 1: Create professional looking forms in Word
http://www.computorcompanion.com/LPMArticle.asp?ID=22
Part 2: Adding Automation to your Word forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=46
Part 3: Learn more VBA (macros) to automate your forms.
http://www.computorcompanion.com/LPMArticle.asp?ID=119
Part 4: Use custom dialog boxes in your Word forms
http://www.computorcompanion.com/LPMArticle.asp?ID=127
Part 5: Connect your AutoForm to a database to save input time and keep
better records!
http://www.computorcompanion.com/LPMArticle.asp?ID=136

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> I have a Word document that is filled with data. I set up a button on
> the document where the user is supposed to click on the button and run
[quoted text clipped - 4 lines]
> VBA. I just don't know what to use to get the database open and
> queried. Help would be greatly appreciated. thanks.
smdesq13 - 31 Aug 2006 01:10 GMT
thank you doug. that worked perfectly. you are truly an MVP
--
smdesq1
Posted from - http://www.officehelp.i
Jean-Guy Marcil - 31 Aug 2006 01:54 GMT
Doug Robbins - Word MVP was telling us:
Doug Robbins - Word MVP nous racontait que :
> Take a look at the last of the following series of articles:
> Part 5: Connect your AutoForm to a database to save input time and
> keep better records!
> http://www.computorcompanion.com/LPMArticle.asp?ID=136
I'll have to remember that one. But I thought the poster wanted to run an
Access Query from Word...

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org
Doug Robbins - Word MVP - 31 Aug 2006 04:44 GMT
The article shows how to access Access from Word. Once that is done, you
can make use of VBA to do almost anything in Access.

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Doug Robbins - Word MVP was telling us:
> Doug Robbins - Word MVP nous racontait que :
[quoted text clipped - 7 lines]
> I'll have to remember that one. But I thought the poster wanted to run an
> Access Query from Word...
Jean-Guy Marcil - 31 Aug 2006 16:03 GMT
Doug Robbins - Word MVP was telling us:
Doug Robbins - Word MVP nous racontait que :
> The article shows how to access Access from Word. Once that is done,
> you can make use of VBA to do almost anything in Access.
I know, I meant that Access VBA to run an Access Query (Like to create a
Query Table) is not something one would expect to find in this group, this
is why I got confused and did not even think of only referring the poster to
code to simply make a Database Connection (since I thought he already knew
how to do that...)
My Bad for not understanding the question...

Signature
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org