Can anyone see why this code won't populate a DataCombo? p.s. I can't use an adodc with this app. (The connect string is good for dsn-less dBase IV datasources)
--------------------------------------------
Private Sub Form_Load()
Dim strQuery As String
Dim rs As ADODB.Recordset
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
With conn
.CursorLocation = adUseClient
.ConnectionString= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & ";Extended Properties=dBASE IV;User ID=Admin;Password=" 'this is actually on one line!
.Open
End With
strQuery = "Select Name from Users"
Set rs = New ADODB.Recordset
With rs
Set .ActiveConnection = conn
.CursorType = adOpenStatic
.Source = strQuery
.Open
End With
Set DataCombo.DataSource = rs
With DataCombo
.DataField = "Name"
.Refresh
End With
End Sub
------------------------------------Thanks!
--Bill
Beeeeer....Mmmmmmmmmm.
-Homer Simpson
--------------------------------------------
Private Sub Form_Load()
Dim strQuery As String
Dim rs As ADODB.Recordset
Dim conn As ADODB.Connection
Set conn = New ADODB.Connection
With conn
.CursorLocation = adUseClient
.ConnectionString= "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & ";Extended Properties=dBASE IV;User ID=Admin;Password=" 'this is actually on one line!
.Open
End With
strQuery = "Select Name from Users"
Set rs = New ADODB.Recordset
With rs
Set .ActiveConnection = conn
.CursorType = adOpenStatic
.Source = strQuery
.Open
End With
Set DataCombo.DataSource = rs
With DataCombo
.DataField = "Name"
.Refresh
End With
End Sub
------------------------------------Thanks!
--Bill
Beeeeer....Mmmmmmmmmm.
-Homer Simpson