Hi
I have a 2 list Box, Which i can populate without any problems and move data between them.
I am having problems with the following code, where i am trying to display the results of the Applications installed on a specific Computer on the lstSoftwareLoaded listbox and those Applications that are not installed on the computer to show on the lstAppAvailable.
For Example
lstAppAvailable lstSoftwareLoaded
MS OFFICE 2003 > Windows Vista
Windows XP < OutLook Express
So the above lists would be displayed when a computer is selected from a drop down list showing all the Software available for insatlling and all the software that is installed on that specific machine.
Any help would be much appreciated.
Thanks
Mo
I have a 2 list Box, Which i can populate without any problems and move data between them.
I am having problems with the following code, where i am trying to display the results of the Applications installed on a specific Computer on the lstSoftwareLoaded listbox and those Applications that are not installed on the computer to show on the lstAppAvailable.
For Example
lstAppAvailable lstSoftwareLoaded
MS OFFICE 2003 > Windows Vista
Windows XP < OutLook Express
So the above lists would be displayed when a computer is selected from a drop down list showing all the Software available for insatlling and all the software that is installed on that specific machine.
Code:
Public Sub DisplayAllComputerDetails(ByRef rsDisplayComputerDetails As DAO.Recordset, ByRef frmAddComputer As Form, ByRef lstSotwareLoaded As ListBox, ByRef lstSoftwareAvailable As ListBox)
With rsDisplayComputerDetails
.MoveFirst
frmAddComputer.cmbMake = .Fields("Computer_ID_Make")
frmAddComputer.txtModel = .Fields("Computer_ID_Model")
frmAddComputer.txtSerialNumber = .Fields("Computer_ID_Serial_Number")
frmAddComputer.txtWarrantyExpiry = .Fields("Computer_ID_Warranty_Expiry")
Do
lstSotwareLoaded.AddItem .Fields("Application")
Dim i As Integer
Dim RemoveQueue() As Boolean
ReDim RemoveQueue(0 To lstSotwareLoaded.ListCount - 1)
For i = lstSotwareLoaded.ListCount - 1 To 0 Step -1
If lstSotwareLoaded.ListIndex Then
'Me.lstAppAvailable.AddItem lstAppsInstalled.ItemData(i)
RemoveQueue(i) = True
End If
Next i
For i = UBound(RemoveQueue) To 0 Step -1
If RemoveQueue(i) Then
lstSoftwareAvailable.RemoveItem i
End If
Next i
.MoveNext
Loop Until .EOF
End With
Any help would be much appreciated.
Thanks
Mo