netSurfer
Nov 24th, 1999, 12:11 AM
I assume that you are looking for a keyword, and whatever values are being returned are getting dumped into a list box. There are 2 things you can do, either dump the returning variables into an array, checking each existing array element to see if it exists, or before you put the value into the list box, check all the existing elements of the list box. I'm not sure which would be faster, depends on how many results will be returned. This is assuming of course that the results being returned are being returned one at a time somewhere. Where ever that is, put your loop there.
Assuming you have a list box (lstResults), call the DumpResults function for each result you find, sending the result string.
like this:
strResult = "Result string"
DumpResult(strResult)
function DumpResults(strTemp as string)
Dim inti As Integer, intJ As Integer
intJ = lstResults.ListIndex 'stores what ever index you're at
For inti = 0 To lstResults.ListCount - 1
lstResults.ListIndex = inti
If lstResults.Text = strTemp Then Exit Function
Next inti
lstResults.AddItem strTemp
lstResults.ListIndex = intJ
end function
[This message has been edited by netSurfer (edited 11-24-1999).]
Assuming you have a list box (lstResults), call the DumpResults function for each result you find, sending the result string.
like this:
strResult = "Result string"
DumpResult(strResult)
function DumpResults(strTemp as string)
Dim inti As Integer, intJ As Integer
intJ = lstResults.ListIndex 'stores what ever index you're at
For inti = 0 To lstResults.ListCount - 1
lstResults.ListIndex = inti
If lstResults.Text = strTemp Then Exit Function
Next inti
lstResults.AddItem strTemp
lstResults.ListIndex = intJ
end function
[This message has been edited by netSurfer (edited 11-24-1999).]