I have a table called installedSoftware which has two fields:
and another table called softwareListTable
I have a listbox on the left hand side with all the values from softwareListTable and a listbox on the right hand side which contain all the records/values from installedSoftwareTable
What I want to do is have a couple of buttons in the middle that can select items from the left and place them in the right and a button when that removes them as well. (It should look some thing like the autoform wizzard when you are selecting fileds)
Can any one help
I have now included a sample.
Basicall I want to keep a log of computers at work and when I install a new comptuer I want to select which software is installed. In the example there are three tables
ComputerName (Linked to computer table)
Softwarename (linked to installed software)
So individual machine can have different software installed.
I started using the code above but it wanted me to change the Row Source Type to a value list. which is not what I wanted to do.
I am trying to copy records
I just got done doing this ... What you need is a "Is Visible" column for your selection list ... After each "Add", update the underlying table for the selection to False on the "Is Visible" column and then requery.
Originally posted by teaboy
Sorry mate not sure what you mean any chance you could post some code or edit my small example?
I posted the following code on another posting ...
Private Sub RemoveWOButton_Click()
If AllocList.ItemsSelected.Count < 1 Then Exit Sub
Dim i As Long, ItemCount As Integer, BDRow As Variant, SelArray() As Integer
i = 1
ItemCount = AllocList.ItemsSelected.Count
For Each BDRow In AllocList.ItemsSelected
AllocList.Selected(BDRow) = False
AvailableQty = AvailableQty + CDbl(AllocList.Column(1, BDRow))
SQLString = "UPDATE " & WO_Tbl & " SET IsVisible=True WHERE (WorkOrderNumber='" & AllocList.Column(0, BDRow) & "');"
DoCmd.RunSQL SQLString, False
SelArray(i) = BDRow
i = i + 1
AvailQtyLbl.Caption = AvailableQty
' For i = AllocList.ItemsSelected.Count To 1 Step -1
For i = ItemCount To 1 Step -1
SQLString = "DELETE FROM " & AllocListTbl & " WHERE (WorkOrderNumber='" & AllocList.Column(0, SelArray(i)) & "');"
DoCmd.RunSQL SQLString, False
AssignToQtyTxt.Value = ""
WO_ComboBox.Value = ""
EditPerformed = True
Originally posted by Teddy
Have you considered using a treeview for this project? I just created the exact same system and it worked really well as a treeview. I tried the listbox thing first but it looked kind of messy.
Originally posted by M Owen
Mine was more in line with the Access field selector of the Form Wizard ... Yours is definitely more impressive!
Actually it just looks more impressive. That's kind of what I was getting at. I tried doing that same application with listboxes and it was a nightmare. The treeview simplifies and cleans everything quite nicely. And to be honest.. it requires less skill then the list box version.
Of course this is all a matter of personal opinion heh.