How do I save multi-selections with the current record?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In Access 97: I created a multi-selection list box. I save the record, but
when I bring it back up, those selections are no longer hi-lited. I hope the
answer is a simple one. I'm not very savvy with programming language and
don't fully understand the "linking" process, so any help would be
appreciated, especially if it's really "spelled out" for me. Thank you.
 
Bugaboo said:
In Access 97: I created a multi-selection list box. I save the
record, but when I bring it back up, those selections are no longer
hi-lited. I hope the answer is a simple one. I'm not very savvy
with programming language and don't fully understand the "linking"
process, so any help would be appreciated, especially if it's really
"spelled out" for me. Thank you.

It is improper database design to store multiple values in a single field.
Being aware of this Access doesn't allow an easy way to do it. The option to
make a ListBox Multi-Selectable is only proper when the ListBox is going to be
used to support some kind of coded sub-routine. It is NOT intended to allow you
to store multiple item in a single table field. In fact (as you have seen),
once you turn on MultiSelect the value of the ListBox is always Null. The way
to get at the values is (in code) to loop through the ListBox's ItemsSelected
Collection.

Whenever you *think* you need to store multiple values in a single field what
you *actually* need is a second table related to the first and then use a
subform to enter as many values you want into the subform. The difference being
that with a subform each value gets stored in its own row of the related table.
 
Back
Top