Stumped...

S

Stephen

I've got a form with a list box that has the following
data within it:

AG Agriculture
HM Hydromod
FS Forestry

I've set the list boxes' "Multi Select" property
to "Simple" so that I can make multiple selections. What I
would like to happen is when I make multiple selections
within this list box, I only want the abbreviations to be
inserted into the underlying table's field so that they
appear like:

AG, HM, FS

When I set the list boxes' "Multi Select" property
to "None", the single abbreviation IS properly inserted
into the underlying table's field. However, when I change
the form's list boxes' "Multi Select" to "Simple", nothing
is inserted into the underlying table's field.

What is the simplest way to accomplish this action (if at
all)?

I will be very grateful for any help that anybody can give
me that might help me in this matter!

--Stephen
 
L

Larry Linson

I've got a form with a list box that has the following
data within it:

AG Agriculture
HM Hydromod
FS Forestry

I've set the list boxes' "Multi Select" property
to "Simple" so that I can make multiple selections. What I
would like to happen is when I make multiple selections
within this list box, I only want the abbreviations to be
inserted into the underlying table's field so that they
appear like:

AG, HM, FS

You have described a "multi-valued" field. That is a violation of good
relational database design principles, and you'll find it difficult to work
with, later. The suggested approach is to have a related table with a
foreign key back to the table where you now have the field, and a record for
each of the values. Then, for example, should you want to create a query to
find every "something" that has an "AG", it will be easy. With a multivalued
field, it would be difficult.

Larry Linson
Microsoft Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top