Kod:
	
	tt = AYARLAR.TextBox12.Value
Set con = CreateObject("adodb.connection")
    con.Open "Provider=Microsoft.ACE.OLEDB.12.0;" & "Data Source=" & tt & ";" & "Extended Properties=""Excel 12.0;hdr=yes;imex=1"""
   
    
    bas = CLng(CDate(TESLIM_A.Value)): bit = CLng(CDate(TESLIM_B.Value)): KODE = CStr(durum_sorgu.Value)
    sorgu = "select * from [SIPARIS$] where clng(cdate(TESLIM_TARIHI)) >=" & bas & ""
    sorgu = sorgu & " and clng(cdate(TESLIM_TARIHI)) <=" & bit & " and [DURUM]='" & KODE & "'"
    Set rs = con.Execute(sorgu)
    
 ListBox1.Clear
        While rs.EOF = False
           
            
            Liste = ListBox1.ListCount
            ListBox1.AddItem
            
            ListBox1.List(Liste, 0) = rs.Fields(12)
            ListBox1.List(Liste, 1) = rs.Fields(16)
            ListBox1.List(Liste, 2) = rs.Fields(13)
            ListBox1.List(Liste, 3) = rs.Fields(14)
            ListBox1.List(Liste, 4) = rs.Fields(15)
            ListBox1.List(Liste, 5) = rs.Fields(21)
            
            ListBox1.ColumnWidths = "60;220;90;90;90;120"
            rs.MoveNext
        Wend 
				




