I am trying to use Allen Browne's ConcatRelated function but I am having some trouble. My code is
For background, I have a table, Transsend_UL, that contains a list of usernames and roles. It appears as:
User1 Role1
User1 Role2
User2 Role1
etc.
I have a second table, Transsend_IP, that I am trying to update with these roles, however I need each user's roles concatenated into one string. I attempted this with the code above, but I get an error "Expected: end of statement" at the
section.
I have never used this function before, so any advise on how to clean this up would be greatly appreciated!
Code:
sqlStr = "INSERT INTO Transsend_IP (Roles) SELECT ConcatRelated("Roles", "Transsend_UL", "Transsend_IP.APP_USERNAME = '" & Transsend_UL.APP_USERNAME & "'", , ";") FROM Transsend_UL;"
For background, I have a table, Transsend_UL, that contains a list of usernames and roles. It appears as:
User1 Role1
User1 Role2
User2 Role1
etc.
I have a second table, Transsend_IP, that I am trying to update with these roles, however I need each user's roles concatenated into one string. I attempted this with the code above, but I get an error "Expected: end of statement" at the
Code:
ConcatRelated("Roles"
I have never used this function before, so any advise on how to clean this up would be greatly appreciated!