>Hello,
>myform.scx contains mycombox with a variable to pass to mylistbox,I means
>select 1 item from mycombox and add to mylistbox:
>mycombox: with items
>AA
>BB
>CC
>and how to add to mylistbox: to have ???
>AA
>BB
>CC
Hi,
It depends how you want to pass the variables, is it your combo box & list box control on the same form? If yes..
Try to use this...
In your form's activate procedure you can put this code:
WITH thisform
.cbosalutation.AddItem("Car Rental")
.cbosalutation.AddItem("Hotel")
.cbosalutation.AddItem("Airport Service")
ENDWITH
You can also set the row source to a table if you want...
Then under the valid procedure of your combo box, you put this code:
cItem = ALLTRIM(this.value)
With thisform
IF !EMPTY(cItem)
.list1.AddItem(cItem)
.list1.Requery()
ENDIF
You have to add some validation to check if a selected item is already in your list, otherwise it will have duplicates.
hope can help.
Jojo R. dela Cuesta
Dalplus Technologies
http://www.dalplus.com