Display multi-list selections in Edit mode

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

Guest

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
 
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
 
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
 
Back
Top