• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Cannot fill multicolomn into List Box

dave_yd

New Member
Dear Chandoo,

I want to fill some data with criteria into Listbox, please click find tools beside Date in the sheet "Input Hauling". It will excecute find form.

I have already create syntax below, but it cannot run well

Do While Not rs.EOF
Listcari.AddItem rs.Fields(0)
Listcari.AddItem rs.Fields(1)
Listcari.List(I - 6, 0) = rs.Fields(0)
Listcari.List(I - 6, 1) = rs.Fields(1)
Listcari.List(I, 2) = rs.Fields(2)
Listcari.List(I, 3) = rs.Fields(3)
Listcari.List(I, 4) = rs.Fields(4)
Listcari.List(I, 5) = rs.Fields(5)
Listcari.List(I, 6) = rs.Fields(6)
Listcari.List(I, 7) = rs.Fields(7)
'rs.MoveNext
I = I + 1
Loop

Please help me to solve this
 

Attachments

Nebu,

I want to take data from Daily Log directly with condition likes in the string : "strsql"

I don't want to show in the sheet Input Hauling if my syntax already shown datas in the list box.

Actually rs record already have datas in the memory, that shown in syntax "CopyFromRecordset rs", I want them to be shown up in the list box.

Could you please help me again?

Regards
 
Hi:

I am afraid that I understood you correctly. I assume that the data on the tab "Input Hauling" is pulled based on SQL query, that is what you want to display on your list box correct me if I am wrong.

Thanks
 
Hi:

Why can't you pull data to a different location than "J15" on your "Input Hauling" tab say any column to the extreme right of your "Input Hauling" tab and refer that data to be displayed on your list box with the same code I have provided earlier.

Thanks
 
Back
Top