I am trying to populate a 3 column listbox in a userform from SQL Server via ADO. When the result set consists of more than one record, there is no problem and the data is displayed properly (ie each piece of data is in its appropriate column) eg...
StockCode..........QtyReqd.........JobDeliveryDate
test1...................1................. 01/01/1900
test2...................1..................31/12/1900
test3...................3..................18/02/1900
however when the recordset returns only a single record, the data does not transpose and views as below (ie each piece of data in the record is on a different line in the first column
StockCode...........QtyReqd.........JobDeliveryDate
test1
1
01/01/1900
here is my code
I have tried removing the Application.Transpose eg ...Please Login or Register to view this content.
However the data still displays incorrectly. Can anyone help?Please Login or Register to view this content.
this question has also been placed on Mr Excels forum at: http://www.mrexcel.com/forum/showthread.php?t=403014
Bookmarks