Hello all,
I've been out of Access for quite some time. Am am trying to get multiple values in a field on a single row.
For instance I want to have multiple people go to the same event at the same time, without having to make multiple rows.
Hello all,
I've been out of Access for quite some time. Am am trying to get multiple values in a field on a single row.
For instance I want to have multiple people go to the same event at the same time, without having to make multiple rows.
Have a look at this link, should give you what you need:
http://www.accessmvp.com/thedbguy/co...itle=simplecsv
Cheers,
Vlad,Have a look at this link, should give you what you need:
http://www.accessmvp.com/thedbguy/co...itle=simplecsv
Cheers,
Don't they have to be in separate records to start with, for that to work though?
Same with Allen Browne's Concatenate function?
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
Yes, at least that is what I thought the OP was after as shown in the attached sample.
Cheers,
Thank you Vlad,
Almost but not quite what I was looking for. My poor explanation's the culprit. What I was looking for is in the Events EVID in the Names table to reference that person going to different events. [tbl_Names].[EVID] could equal 1,3,6... or the same with the other tables. Multiple people can go to the same event on the same date. Also names can go to different events, different dates. I was trying to only change the reference ID vice having the names being repeated in [tbl_Names]. You could use the lookup tab in the table design and use a combo box and select each event as an example, but I was lead to believe that is bad form.
Thanks
Wayne
Your structure is all wrong
You should have a table that links Names to Events to Dates?
I have a similar setup for a personal project. That links 4002 crew names, 59 ships, and 53 dates, as well as Rank, making a table to join them all being over 20,000 entries.
However names are not duplicated, nor are ships, dates or rank.
Please use # icon on toolbar when posting code snippets.
Cross Posting: https://www.excelguru.ca/content.php?184
Debugging Access: https://www.youtube.com/results?sear...bug+access+vba
Wayne,
You do not want to have an actual list for the EVID, you build that list as needed in a query (and show it in a form or report) using the approach I showed you. SO you need to move the EVID from tbl_Names as suggested by Welshgasman into a new linking table (tbl_EventNames) with three fields (EVN_ID PK AutoNumber, NID_FK Long, EVID_FK Long) and once you populate that you simply use something like this to get your list:
Cheers,Code:SELECT tbl_Names.NID, [LAST] & ", " & [FIRST] AS FullName, SimpleCSV("SELECT [EVID_FK] FROM tbl_EventNames WHERE NID_FK=" & [NID],",") As EventList FROM tbl_Names ORDER BY [LAST] & ", " & [FIRST];