I made a form that my clients can use with AdobeReader8 to create barcoded labels and Submit by Email. But to make this procedure more solid I have to publish this form to our intranet and have it automatically update an access database everytime my users fill the form.
So far I managed to insert TextField1 value into a connected access database. The problem is the TextField1 is in a repeatable subform. So only the first instance of TextField1 is written into the attached database. I would like it to read each instances of TextField1 values and write each values in different rows into the access database. I am a beginner and I have scoured the web for any idea but to no avail. I already climbed a mountain to learn this program and build this form from scratch and I'm exhausted. Please help!
First, database connections are a two way street. Data both goes into and comes out of the DB and the fields the DB is connected to. In order to hide the DB from the users and get better control over the process of what goes where I connect the database to a set of invisible fields. The visible fields on the form are not connected to anything. Tnen I use code to move data from the visible fields to the hidden fields, and from there into the DB. Or in the oposite direction.
Another reason for doing things this way is to handle the repeated fields. Usually the database will have several tables that are related to each other, for example, a customer info table and an order table. On the form there is only one set of customer info, or one row of info in the customer info table. But there might be several order items in repeated fields, which relate to several rows in the order info DB.
We have two different sets of data on the form which are connected to two different DB tables and are written into the the two different tables in different ways. It's much easier to handle this all in code, rather than trying to set up field connections to do it. It also allows you to have much greater control over how the user interacts with the form.
Thom Parker
The source for PDF Scripting Info
www.pdfscripting.com
Very Important - How to Debug Your Script