>>>George --
>>>
>>>That one sounds ripe for an access method %)
>>
>>Jay,
>>
>>Not a bad idea for single selection list box. Probably have to return a delimited string for mult-select.
>
>George --
>
>It's one of those things that I only write once for a control, but always have to think about... It would be simple to test for the type of the parameter, and pass back a delimited string if a DS of numbers were passed in.
Jay,
Sure something like this:
PROCEDURE SelectedItems_Access
LOCAL lcresult, lni
lcresult = ""
WITH This
IF .MultiSelect
FOR lni = 1 TO .ListCount
IF .Selected(lni)
lcresult = lcresult + .List(lni) + ","
ENDIF
NEXT
IF NOT EMPTY(lcresult)
lcresult = LEFT(lcresult, LEN(lcresult) - 1)
ENDIF
ELSE
IF .ListIndex > 0
lcresult = .List(.ListIndex)
ENDIF
ENDIF
ENDWITH
ENDPROC
? _SCREEN.ActiveForm.List1.SelectedItems
George
Ubi caritas et amor, deus ibi est