Home |
Search |
Today's Posts |
#1
|
|||
|
|||
FORMS GURU LEVEL QUESTION -Exporting FormField info to a SQL Datab
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 |
#2
|
|||
|
|||
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. "BigWylie1" wrote in message ... 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 |
#3
|
|||
|
|||
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 he 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 On Fri, 29 Apr 2005 13:45:20 -0700, BigWylie1 wrote: 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 |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Forms - another question | Microsoft Word Help |