Hi PAul.
myform.scx contains mycombox with a variable to pass to mylistbox,I means
select 1 item from mycombox and add to mylistbox:The simple answer is something similar to this in the combo box's Valid():
Thisform.MyListBox.AddItem( This.List[ This.ListIndex ] )
This works for a RowSourceType of 0-None. If your list box has a RowSourceType of 2-Alias or 6-Fields, you need code like this instead:
INSERT INTO < ListBox Alias > ( < Field NAme > ) VALUES ( This.Value )
Thisform.MyListBox.Requery()
And if the list box has a RowSourceType of array, you would add the combo box's value to the array and REQUERY() the list box.
But there are other issues here to. Do you want to be able to add the same item from the combo box to the list box over and over again? Or should you remove the item from the ombo box after it has been added to the listbox? If this is the case, maybe you need a mover list instead. You can take a look at the mover list that ships with the VFP foundation classes.