with thisform.pageframe1.page2.List2
for ix=1 to .Listcount
if .Selected[ix]
insert into temp1 values (.List(ix) )
endif
ENDFORIn addition to what Andy told you, you will need to make sure that your RowSOurce for the ListBox has 2 columns, one for key1 and one for key2.
FOR ix = 1 TO .ListCount
IF .Selected[ix]
INSERT INTO temp1 ( key1, key2 ) VALUES ( .List[ ix, 1 ], .List[ ix, 2 ] )
endif
ENDFOR
Note that if the data type in the cursor are not character strings, you will need to convert the values in the list box's internal list from character to numeric using the VAL() function.
The values in a List Box are always stored in its internal list in Character format.