vertical lsiting of data from multi-value field

brastedhouse

New member
Local time
Today, 11:03
Joined
Apr 13, 2016
Messages
8
Hello again, it seems to be question week. I have a field of member names that is stored in a multivalue field. ugh. When the field is displayed with more than one member, it lists them horizontally across the text box. Not very readable. Thanks MS. So I was wondering if anyone has seen a function or some code that would force it to go vertically by member. Thanks, Scott

p.s I appreciate not being vilified for multi-value fields. I inherited them and I do not have the time right now to undo them (a lot of them). Multi-value fields sometimes elicit strongs responses on other forums.
 
multivalue fields should not be used in this way. They should be used for a relatively fixed range of values - e.g. day of week, month of year, postcodes or regions. Any professional developer wont use them since they are unnecessary and limit database design.

you may express concerns about being vilified for using them but then complain about their limitations - so the answer is, don't use them.

with regards your particular problem, I believe you have an option to specify the separation character (usually a comma), not sure where you will find this, probably in file>options - perhaps you can change the character to a carriage return or linefeed.

alternatively investigate the combo dropdown method - no idea if it works with multivalue fields but might provide a solution for you
 
you select its Value and since value is numeric/string pk field of the other table you should link the lookup table

select id, multivaluefield.Value, othertable.field1 from from yourtable inner join othertable
 
i assume there is some way of iterating the members of a mvf

so this sort of thing will give you a string consisting of the mvf members each on a separate line

Code:
 dim s as string
 for each item in mvf
     s = s & item & vbcrlf
 next
 
another thought - can you change the combobox to a list box? don't know if that will work with a multivalue field but worth a try
 

Users who are viewing this thread

Back
Top Bottom