Display multi-list selections in Edit mode

L

Laurel

Hello!
Thanks so much for all the help and ideas.

I have a form that contains a subform with 2 list boxes. On the subform,
when a selection is made from lstCategory, it populates lstError, a
multi-select list box. The main form populates a table with a key field of ID
and the subform populates a separate table. They are linked by a query
tblMain.ID and tblSub.ID with a one to many relationship.

Someone already worked out for me the storing the multiple selections on
tblSub but when I return to a record on the form after entering it, the
selections previously made aren't on the form. They're on the table but not
the form. Can anyone help?

Thanks,
Laurel
 
R

Roger Carlson

In the OnCurrent event of the form, you'll have to put some code that will
read the values and set the appropriate selections to True. On my website
(www.rogersaccesslibrary.com), is a small Access database sample called
"MultiSelectListboxes2k.mdb" which illustrates how to do this. Look at the
"Bound Listbox" example.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
L

Laurel

Thanks Roger.

Roger Carlson said:
In the OnCurrent event of the form, you'll have to put some code that will
read the values and set the appropriate selections to True. On my website
(www.rogersaccesslibrary.com), is a small Access database sample called
"MultiSelectListboxes2k.mdb" which illustrates how to do this. Look at the
"Bound Listbox" example.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 

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