Hi All,
I'm trying to figure out how to take a list of values in an unbound Text Box (on a form), and insert those values into a specified table upon clicking a button.
1) User pastes a list of names into the Text Box (txtNames) on the form. Each subsequent name is on a new line, e.g.:
User1
User2
User3
User4
etc.
2) Clicks Button
3) Insert those names into tblUser_Listing; this table contains only a single text field called "Username"
The current solution that I have is inserting the entire list of names into a single record in that table. E.g.: if I paste a list of 10 names into the Text Box and then click the button, it's inserting all 10 names into a single record in the table rather than 10 separate records.
Code:
CurrentDb.Execute "Insert Into tblUser_Listing (Username) " & _
"Values ('" & Me.txtNames & "')"
Any help would be appreciated. Thanks!