Saving form data

  • Thread starter Thread starter Bob
  • Start date Start date
B

Bob

I have created a survey form using Word 2003. When an
employees fill out the form I want to accumulate all their
selections in a single text file or Excel database. I
have tried several methods but I keep getting either lots
of files or over writing the data with new data. Is there
a way to do this? I am familar with Visual Basic and can
use that if necessary.
I hope someone can help me. Thank you for any suggestions.
 
Hi Bob,
I have created a survey form using Word 2003. When an
employees fill out the form I want to accumulate all their
selections in a single text file or Excel database. I
have tried several methods but I keep getting either lots
of files or over writing the data with new data. Is there
a way to do this? I am familar with Visual Basic and can
use that if necessary.
Since you don't detail what you've tried, it's a bit
difficult to say much more than, "Yes, it's possible and yes,
you need to use VBA."

Assuming the users have returned the full form (and not used
"Save data only" and sent that back), my preference would
probably be to have the VBA code
- open each form in succession (from the same folder)
- loop through the form fields and pass the data to where
I want to save it

If this were a "real" database, I'd probably use ADO, create
a set of records, then send an UPDATE command through the
connection to the table.

For Excel, I can see three possible approaches
- write each field to the appropriate cell; moving to a
new line for each new record (I think this must be what you
tried, and the point you missed)

- writing to a text file, in delimited format, and
importaing that to Excel

- setting up an ADO dataset and using Excel's internal
CopyFromRecordset method to drop it into the worksheet

In any case, you should follow up on this in an appropriate
programming newsgroup (excel.programming for the Excel parts;
a Word.vba group for the Word parts).

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun
8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow
question or reply in the newsgroup and not by e-mail :-)
 
Back
Top