
Access List ctrl = Good / VB List ctrl = Crap ???
Quote:
>In Access95 I can easily fill the list control with rows of data from
>a table by setting its row source to an SQL statement like this :
>"Select * From Customers Where SSN = tbSSN"
Take a look at the on-line help for WHERE.
Quote:
>In the string above tbSSN is a textbox that the user types an SSN in.
>In VB4.0 I try to set the Data Controls RecordSet property to the same
>string and I get errors...
>My reference to the list control is based on in Access the list
As you found out, VB is not Access.
Quote:
>control has a Rowsource property that accepts an SQL string. For some
>reason in VB EVERY thing seems to have to be bound to the Crappy Data
>Control!!!
>Why can I not just fill a Grid of SOME kind with out using the
>DataControl ?????
>Am I just stupid here or what ???
>Thanks for any comments...
This requires no data control or bound control of any type.
It nicely fills a list box in short order.
Dim ListSet As Snapshot
Dim MyDB As Database
Dim MyTable As Table
Set MyDB = OpenDatabase("C:\tables\mydata.mdb")
Set MyTable = MyDB.OpenTable("People")
Set ListSet = MyTable.ListFields()
MyTable.Close
Do While Not ListSet.EOF
lstNames.AddItem ListSet("First_Name")
ListSet.MoveNext
Loop
http://www.xnet.com/~kd9fb