Tried a couple of forums. No one seems to be able to clearly explain how to do this. HELP!
I know it can be done, i just can't get the syntax right. All i need to do is get the contents of a text area box and insert it into an access database. The complex part is this. For what i need to accomplish is to use a text area form field to collect multiple lines of data but on submit, allow those lines to be saved in seperate rows to an access database. Say instead of having 20 text fields for the user to enter, Create one text area, and require that when copy and pasting or just entering data, that the first line of the text area goes to an access row, the second line goes to the next available row and so on. I guess it would be something lie this...
Name of text area (myTextArea)
<textarea>
Enter DATA - 1 Line (go to row 1 in db)
Enter DATA- 1 line (go to row 2 in db)
Enter DATA - 1 line (go to row 3 in db)
</textarea>
I hope that was clear.
Now i know i can use the split function to take care of the data entered. Something like this...
Dim strTextArea
Dim arrTextLines
strTextArea = request.form("myTextArea")
arrTextLines = Split(strTextArea,vbNewLine,-1,1)
arrTextLines(0)
arrTextLines(1)
Something like that. But the part i'm having trouble with is, how do i get that array into a variable that Access will understand that it needs to update itself row by row, in whatever column I choose, that each line entered in the text area needs to go into it's own next available DB row. Can someone give me a code snippet on how they would accomplish that. Does it involve a loop? Just can't get it to work, sigh.
Example
<textarea>
info 1
info 2
info 3
<textarea>
After submit, take those lines to column 3 row by row the databse table would look something like this
COLUMN 1, COLUMN 2, Column 3
Row 1 info 1
Row 2 info 2
Row 3 info 3
I hope that was kind of a clear explanation. If anyone can help, it would be greatly appreciated!!!!

Name of text area (myTextArea)
<textarea>
Enter DATA - 1 Line (go to row 1 in db)
Enter DATA- 1 line (go to row 2 in db)
Enter DATA - 1 line (go to row 3 in db)
</textarea>
I hope that was clear.
Now i know i can use the split function to take care of the data entered. Something like this...
Dim strTextArea
Dim arrTextLines
strTextArea = request.form("myTextArea")
arrTextLines = Split(strTextArea,vbNewLine,-1,1)
arrTextLines(0)
arrTextLines(1)
Something like that. But the part i'm having trouble with is, how do i get that array into a variable that Access will understand that it needs to update itself row by row, in whatever column I choose, that each line entered in the text area needs to go into it's own next available DB row. Can someone give me a code snippet on how they would accomplish that. Does it involve a loop? Just can't get it to work, sigh.
Example
<textarea>
info 1
info 2
info 3
<textarea>
After submit, take those lines to column 3 row by row the databse table would look something like this
COLUMN 1, COLUMN 2, Column 3
Row 1 info 1
Row 2 info 2
Row 3 info 3
I hope that was kind of a clear explanation. If anyone can help, it would be greatly appreciated!!!!
Comment