Click to See Complete Forum and Search --> : Dynamic Updation of List Box


nandini
December 15th, 1999, 03:02 PM
Hi,

I am working on a project in MS-Access. I have a form with 2 list boxes. Based on the selections in the first list box, the second list box has to be dyanamically updated with values from a field in the database. How can I add/ delete items in the list box at run time? Unlike VB which has an additem method for a list box, VBA doesn't support this method. Any suggestions on this are welcome.

Thanks in advance.
Nandini

Jean Spector
December 16th, 1999, 08:29 AM
Just a suggestion:check if List1_Changed method is available

Jean
mage@lycosmail.com

December 16th, 1999, 10:38 AM
Hi,
U can use this. If U have two list/comboboxes. set the second combobox's row source as the sql statement in the first combo's lost focus event.

Combo4.RowSource = "select statement" & combo1.value ' use it as required.
Combo4.Requery

Hope this will help. If U require any more mailme at ksenu@yahoo.com.
Thanks
Srinivas