Preserving the order of selection in listbox (1 Viewer)

xalbert76

New member
Local time
Today, 04:08
Joined
Sep 14, 2017
Messages
3
Dear all.

I have the following problem concerning the multivalued fields in Access. My table 'names' contains names:
Peter
John
Scott
My 'papers' table contains a multivalued field 'authors' which stores multiple names selected using a combo box from the table above. If I first check Scott and then Peter, the multivalued field will read 'Peter; Scott'. However, I want to preserve the order in which I select the names, i.e. want to have 'Scott; Peter'.

Is there a way to accomplish this in Access 2007 without having a dedicated field for each name?

Thank you,

Roman
 

MarkK

bit cruncher
Local time
Yesterday, 19:08
Joined
Mar 17, 2004
Messages
8,180
I don't think a multivalued field is sufficient for that purpose anyway. In order to sort by selection order you need to be able to store the date/time the item was selected. I would expect you need a related table, and a related table is simpler anyway.
hth
Mark
 

Ranman256

Well-known member
Local time
Yesterday, 22:08
Joined
Apr 9, 2015
Messages
4,339
you would need a counter to take with the pick.
 

xalbert76

New member
Local time
Today, 04:08
Joined
Sep 14, 2017
Messages
3
A related table is one possibility which would be fine if I had a large number of rows in my table 'papers'. For not-so-large tables, the multivalued fields should be fine. As Ranman256 points out, I need to monitor the order in which I check the individual names in the combo box. Ideally, I would need something like Ctrl+mouse click that would monitor the order but the combo box does not have this functionality. Is there a way to do this using Visual Basic?
 

MarkK

bit cruncher
Local time
Yesterday, 19:08
Joined
Mar 17, 2004
Messages
8,180
If I needed to save a sequence of events, I would store the date/time each event occurred in a table, and then sort by those stored date/time values. If the event in question is a click on a row, I would add a field to that row to store the date/time the row was clicked.
hth
Mark
 

Users who are viewing this thread

Top Bottom