Windows XP
SSQl 2K BE
A2003 FE
Hi
i have 2 list boxes on a pop up form
they both using ADO queries as their source,
i use the left hand list box to search for documents and add selected documents to the right hand list box, which will synchronise with a main form form. i also delete some documents from the right kand list box, if not appropriate for the main form
my problem for the moment is an example is thus
LH list box values............RH list box values
1.................................3
2.................................4
3.................................5
4.................................6
5.................................8
7.................................9
if i press a button, how do i end up with values in the LH box, that are not in the RH, so the LH box returns
1
2
7
if i highlight all the RH box so they are selected, i can do this by using
' Loop through the selected items in the list box and build a text string
For Each varItem In Me!lstActual.ItemsSelected
strCriteria = strCriteria & "," & Me!lstActual.ItemData(varItem) & ""
Next varItem
' Remove the leading comma from the string
strCriteria = Right(strCriteria, Len(strCriteria) - 1)
i then build 'strCriteria' into the LH box query
but i would like to not have to highlight all the items in the RH box, is there another way round this?
thanks in advance
SSQl 2K BE
A2003 FE
Hi
i have 2 list boxes on a pop up form
they both using ADO queries as their source,
i use the left hand list box to search for documents and add selected documents to the right hand list box, which will synchronise with a main form form. i also delete some documents from the right kand list box, if not appropriate for the main form
my problem for the moment is an example is thus
LH list box values............RH list box values
1.................................3
2.................................4
3.................................5
4.................................6
5.................................8
7.................................9
if i press a button, how do i end up with values in the LH box, that are not in the RH, so the LH box returns
1
2
7
if i highlight all the RH box so they are selected, i can do this by using
' Loop through the selected items in the list box and build a text string
For Each varItem In Me!lstActual.ItemsSelected
strCriteria = strCriteria & "," & Me!lstActual.ItemData(varItem) & ""
Next varItem
' Remove the leading comma from the string
strCriteria = Right(strCriteria, Len(strCriteria) - 1)
i then build 'strCriteria' into the LH box query
but i would like to not have to highlight all the items in the RH box, is there another way round this?
thanks in advance