List box: Multiple selections store in a field

S

SF

Hi,

In VB, I can store multiple selections in one filed. Can I store multiple
selections in one bound field in Access?

SF
 
A

Allen Browne

It is possible to loop through the ItemsSelected collection of the list box
to generate a delimited string of the values, and then assign that to a
bound field, but there is no benefit in storing the data that way.

Wherever you have many values related to one record, you *really* need to
create a related table with a one-to-many relationship to the original one.
The simplest interface is then a subform where the user can select multiple
values.

If you prefer, you can use program code to write the records in the related
table from the multi-select list box, but you would need to have a good
reason for going to that trouble, appending and deleting the related
records, setting the selected items in the Current event of the form, and
resetting them in the form's Undo event.
 
S

SF

I have a proposal table and each proposal could cover more than 1 communes.
For single line display purpose, this would be useful.

SF
 

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

Top