Multi-Select List-Box no data in table

  • Thread starter Thread starter Subzero
  • Start date Start date
S

Subzero

Hi All,

I really hope that someone can help me.

I have quite a big database and I have lists boxes on every form. Most need
to be multi-select, which they are however what ever I select either doesn't
transfer at ALL into the table or only one value does. Please could someone
tell me a way to fix this?

Sub x
 
Subzero said:
Hi All,

I really hope that someone can help me.

I have quite a big database and I have lists boxes on every form.
Most need to be multi-select, which they are however what ever I
select either doesn't transfer at ALL into the table or only one
value does. Please could someone tell me a way to fix this?

Sub x

Multi-Select ListBoxes always have Null as their value. They are intended
to be used only for coding operations and not for entering data into tables.

Despite Microsoft's decision to add Multi-Value fields to Access 2007, a
field in a table should hold exactly one piece of data. If you need
multiple pieces of data then you need another related table to hold those
values.
 
Thank you for replying so quickly.

So I would need to create a seperate table for each of my list boxes?

Then would I have one value per field?

Sorry if the questions are simple.
 
I, for one, can't quite picture what you are doing.

List boxes can display information that is in a table. That can be one
or multiple fields for records that are in a record in a table. For
example: a table main contain records that each contain a team name
and a team member's name.
A single listbox could then display all teams in that table. Another
list box could look at that same table and disply all the member names
for a specific team.

Given that type of use, I can't picture in my mind what you are trying
to do with multiple selected items from a list box. In out example you
could select a team on one list box, then display the members of that
team in another list box. Now if you wanted to do something (maybe
send and email, for instance) to selected members from that listbox,
you have to use vba code to bounce through the entries in the listbox
and find out which ones have been selected and do that operation for
each of them. As Rick mentioned, you cannot access all of and only
the selected records via a single instruction.

If we had a better idea of what you are trying to do someone may be
able to come up with a solution for you.

Ron
 
Subzero said:
Thank you for replying so quickly.

So I would need to create a seperate table for each of my list boxes?

You would replace your ListBoxes with Subforms bound to related tables.
Details would require that we know what your data looks like.
Then would I have one value per field?

You would have one subrecord in the related table for each choice that you
are now trying to make in a ListBox.
 
Back
Top