oxicottin
Learning by pecking away....
- Local time
- Today, 17:03
- Joined
- Jun 26, 2007
- Messages
- 856
Hello, I have a field (DelimitedEmployees) from my table (tbl_WeeklySafetyHuddle) that are names/data saved as a comma delimited from a list box. Is there a function anyone knows of that will take that field in the table and separate the names into a temp table or something like that? I did find the code below for separating movie Genres but I dont really know what the line below is for so I can alter it for my needs?
Dim GenreList() As String
Dim GenreList() As String
Code:
Public Sub GetGenres()
Dim rs As DAO.Recordset
Dim rs_out As DAO.Recordset
Dim x As Long
Dim GenreList() As String
Set rs = CurrentDb.OpenRecordset("SELECT Films.Genre FROM Films")
Set rs_out = CurrentDb.OpenRecordset("Genres_Temp")
With rs
Do
GenreList = Split(!Genre, ", ")
For x = LBound(GenreList) To UBound(GenreList)
rs_out.AddNew
rs_out!Genre = GenreList(x)
rs_out.Update
Next x
.MoveNext
Loop Until .EOF
End With
rs_out.Close
Set rs_out = Nothing
rs.Close
Set rs = Nothing
MsgBox "Done"
End Sub