Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Tables / April 2005

Tip: Looking for answers? Try searching our database.

FORMS GURU LEVEL QUESTION -Exporting FormField info to a SQL Datab

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BigWylie1 - 29 Apr 2005 21:45 GMT
How would I capture specific form fields protected in a Word Protected
document form.
More specifically, I am creating a sales proposal tool for our sales team in
a Word Table formatted document. 300 'cell' in this table.
Once the sales person completes the document fields we would ike to have
some type of "log" button to transmit a small portion of the data ( 10
fields) inputted into a SQL server database.

Can a "log/submit" button EXPORT Specified bookmarked "cell" information
inputted by the sales person into the SQL dbase?  If so what is the procedure
for setting up this type of "button".

PLEASE HELP    
Jezebel - 30 Apr 2005 00:39 GMT
This is entirely straightforward if you know how to write VBA code, but not
otherwise.

1) The contents of the form field are each identifable by bookmark, as shown
in the form field properties dialog.

2) In VBA you write an SQL statement using the form field values, open the
database and execute the SQL statement.

3) You associate the log/submit button with the macro that does all this.

Do a Google on VBA code samples: what you're asking is a very common
requirement.

> How would I capture specific form fields protected in a Word Protected
> document form.
[quoted text clipped - 11 lines]
>
> PLEASE HELP
Dian D. Chapman, MVP - 30 Apr 2005 04:06 GMT
You can use ADO (ActiveX Data Object) to connect to your DB, using the
SQL Provider (driver), such as

'Prompt for username and password
oConn.Properties("Prompt") = adPromptAlways
oConn.Open "Driver={SQL Server};Server=Aron1;DataBase=pubs;"

(If you've done any ASP work...it's very similar.)

You'll then need to either open a table to add a new record or run a
query to find the RS to update. Then capture and pass the info from
the form fields into the DB and update.

You'll find an article on this process, along with a downloadable
sample for Access (which will be more or less the same except for
using the SQL provider versus the Jet one for Access).  The code is
open so you can mess with the code, DB and form to see how it works.
You'll find this here:

Word AutoForm Articles
http://www.mousetrax.com/techpage.html#autoforms

Specifically...look for the Please Fill Out This Form series...article
# 5 w/download.

You may also want to check out this book...great for getting you up to
speed, quickly. 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

>How would I capture specific form fields protected in a Word Protected
>document form.
[quoted text clipped - 9 lines]
>
>PLEASE HELP    
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.