Go here:
http://www.mousetrax.com/techpage.html#autoforms
And read article # 5 in the Please Fill Out this Form series. Download
the sample form and Access DB. You can open the code to see how it was
done.
Then you will need to change the JET Provider for the SQL Provider.
Either see this link: www.microsoft.com/data or get this book
http://www.mousetrax.com/books.html#ado.
Good luck...
Dian D. Chapman, Technical Consultant
Microsoft MVP, MOS Certified
Editor/TechTrax Ezine
Free MS Tutorials: http://www.mousetrax.com/techtrax
Free Word eBook: http://www.mousetrax.com/books.html
Optimize your business docs: http://www.mousetrax.com/consulting
Learn VBA the easy way: http://www.mousetrax.com/techcourses.html
>I would like to write a Word macro to get some data out of a SQL server
>database and put it into the Word document. Can anyone show me how to do
>this or point me to enough documentation within MSDN to accomplish this? I
>have working SQL queries and subqueries, I just need to know how to make the
>connections and write that particular type of macro. Thanks!