LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default DataList not fill

Help which is my err? thanks!

Private Sub TextBox1_Change()
Dim Way As String
Dim Cnn As ADODB.Connection
Dim Rst As ADODB.Recordset
Dim dlDataList As DataList
Dim Fonts As String

Load UserForm1
Way = ThisWorkbook.Path
Fonts = TextBox1
Set Cnn = New ADODB.Connection
With Cnn
.Provider = "Microsoft.Jet.OLEDB.4.0"
.ConnectionString = "Data Source=" & Way & "\Travels.mdb"
.Open
End With

Set Rst = New ADODB.Recordset
Rst.Open "SELECT DISTINCT Travel.Tname FROM Travel WHERE Travel.Tname " & _
"LIKE '" & Fonts & "%' ORDER BY Travel.Tname", Cnn, , , adCmdText

Set Adodc1.Recordset = Rst
Set dlDataList = DataList1
Set dlDataList.RowSource = Adodc1

Rst.Close: Set Rst = Nothing
Cnn.Close: Set Cnn = Nothing

End Sub


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
prepare a Production Batch sheet from Datalist Narnimar Excel Discussion (Misc queries) 0 July 17th 09 11:03 AM
Eliminate double entries in datalist in bulk [email protected] Excel Discussion (Misc queries) 0 October 17th 07 03:15 PM
Excel Datalist functions / lookup summary [email protected] Excel Discussion (Misc queries) 2 May 26th 06 08:11 PM
Finding all matches in column B with datalist in column A Pops Jackson Excel Programming 3 April 11th 06 08:10 PM
DataList or DataGrid link to Recordset or External Data No Name Excel Programming 0 November 11th 03 02:58 PM


All times are GMT +1. The time now is 04:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"