hi all,
- I have 2 list boxes.
- listbox1 is a query on an table on SQL server.
- I want to select a value in listbox1, click and 'ADD' button and the selected value moves into listbox2.
- I have managed to get the values moving from one listbox to another but the values don't always appear in the correct columns. There are 3 colums in total. The first 'ADD' works correctly. When i select another record and hit 'ADD' again it misses 2 cell counts (sry, not sure of the correct grammar) and the selection from listbox1.column1 appears in listbox2.column3 and the next columns wrap onto the next line.
Here's what i've got......
And here's an example of whats happening.....
Listbox2
REQ...............Stockcode...............SerialNo...............
RE1................S1.........................SN1....................
(blank)............(blank)...................RE2....................
S2..................SN2.......................(blank)................
(blank)............RE3........................S3.....................
SN3................and so on........
I hope i have explained this enough.
Can anyone help,
Thanks
- I have 2 list boxes.
- listbox1 is a query on an table on SQL server.
- I want to select a value in listbox1, click and 'ADD' button and the selected value moves into listbox2.
- I have managed to get the values moving from one listbox to another but the values don't always appear in the correct columns. There are 3 colums in total. The first 'ADD' works correctly. When i select another record and hit 'ADD' again it misses 2 cell counts (sry, not sure of the correct grammar) and the selection from listbox1.column1 appears in listbox2.column3 and the next columns wrap onto the next line.
Here's what i've got......
Code:
Me.listSerial2.AddItem Me.listSerial1.Column(0) & ", " & _
Me.listSerial1.Column(1) & ", " & _
Me.listSerial1.Column(2)
And here's an example of whats happening.....
Listbox2
REQ...............Stockcode...............SerialNo...............
RE1................S1.........................SN1....................
(blank)............(blank)...................RE2....................
S2..................SN2.......................(blank)................
(blank)............RE3........................S3.....................
SN3................and so on........
I hope i have explained this enough.
Can anyone help,
Thanks