How do I get this to work?
I have two list boxes list1 and list2. I have a drop down list in list2 and
I am populating a display list of items in LIST1 as the user clicks on the drop down list in list2:
(in the click procedure of list2)
WITH THISFORM
.WINDOWSTATE = 0
.list1.ADDLISTITEM(.list2.VALUE)
SELECT varea
APPEND BLANK
repl area with .list2.VALUE
ENDWITH
What I cannot get to work is removing an item from list1 as the user clicks on an item in list1. He may do this because he made a mistake by incorrectly choosing one of the items.
This works but only one item and then I get an error.
Looks like I am creating an index number with vitemnum.
I know this doesn't work correctly but it was a way to get the thing to work one time at least.
I tried this code:
WITH THISFORM
.WINDOWSTATE = 0
vitemnum = 1
.list1.RemoveLISTItem(vitemnum)
vitemnum = vitemnum + 1
SELECT varea
DELETE FOR area = .list1.VALUE
ENDWITH
"varea" I create a CURSOR of items also named varea as the user chooses items in the drop down list box to use later in a REPORT FORM.
I think the problem is I need to capture the INDEX number in list1 the user is clicking on to remove a list item.
How do I capture this index number?
John O'D
I have two list boxes list1 and list2. I have a drop down list in list2 and
I am populating a display list of items in LIST1 as the user clicks on the drop down list in list2:
(in the click procedure of list2)
WITH THISFORM
.WINDOWSTATE = 0
.list1.ADDLISTITEM(.list2.VALUE)
SELECT varea
APPEND BLANK
repl area with .list2.VALUE
ENDWITH
What I cannot get to work is removing an item from list1 as the user clicks on an item in list1. He may do this because he made a mistake by incorrectly choosing one of the items.
This works but only one item and then I get an error.
Looks like I am creating an index number with vitemnum.
I know this doesn't work correctly but it was a way to get the thing to work one time at least.
I tried this code:
WITH THISFORM
.WINDOWSTATE = 0
vitemnum = 1
.list1.RemoveLISTItem(vitemnum)
vitemnum = vitemnum + 1
SELECT varea
DELETE FOR area = .list1.VALUE
ENDWITH
"varea" I create a CURSOR of items also named varea as the user chooses items in the drop down list box to use later in a REPORT FORM.
I think the problem is I need to capture the INDEX number in list1 the user is clicking on to remove a list item.
How do I capture this index number?
John O'D