Dynamic Data List Box (how to get one) 
Author Message
 Dynamic Data List Box (how to get one)

I have MS Access type database.  I want a Combo List Box where as the user
types in characters, the list box displays matches from the file (jumps
down to this place in the list).  The related table is too big to load
into an internal array.  Thanks,
Mike & Cindy


Fri, 09 Jan 1998 03:00:00 GMT  
 Dynamic Data List Box (how to get one)

Quote:

>I have MS Access type database.  I want a Combo List Box where as the user
>types in characters, the list box displays matches from the file (jumps
>down to this place in the list).  The related table is too big to load
>into an internal array.  Thanks,
>Mike & Cindy

Take a look at Aware VBX from Far Point.

John

-----------------------------------------------
VisualWare, Inc.
Custom Visual Basic, C++, and Windows Programming
1675 East Main St, Suite 218
Kent OH 44240
(216) 297-4444

-----------------------------------------------



Sat, 10 Jan 1998 03:00:00 GMT  
 Dynamic Data List Box (how to get one)
: I have MS Access type database.  I want a Combo List Box where as the user
: types in characters, the list box displays matches from the file (jumps
: down to this place in the list).  The related table is too big to load
: into an internal array.  Thanks,
: Mike & Cindy

Hi Mike & Cindy,

Filling a list box from selected records is an easy job. Just do the
following:

- Add a TextBox to your form,
- Type in the string to match into it,
- Build a SQL-sentence using this string:
    MySQL = "SELECT * FROM MyTable WHERE MyField = '" & Text1.Text & "'"
- Do a CreateDynaset with this SQL-sentence:
    Set MyDS = CreateDynaset( MySQL )
- Fill your Combo looping through the Dynaset:
    i = 0
    MyDS.MoveFirst
    Do Until MyDS.EOF
        List1.AddItem MyDS.Fields("MyField").Value, i
        MyDS.MoveNext
        i = i + 1
    Loop

This way you won't need to load the entire table into memory.
The ListBox will contain only matching rows and no positioning
will be necessary.

Hope this helps. It worked for me.

Haluk Okur / SIMKO A.S.       (Siemens in Turkiye)

Tel   : +90 (216) 389-5940, ext 4563                                 -\<,
Fax   : +90 (216) 306-2548                                      ___(*)/(*)___



Sat, 17 Jan 1998 03:00:00 GMT  
 Dynamic Data List Box (how to get one)

Quote:

>Filling a list box from selected records is an easy job. Just do the
>following:
>- Add a TextBox to your form,
>- Type in the string to match into it,
>- Build a SQL-sentence using this string:
>    MySQL = "SELECT * FROM MyTable WHERE MyField = '" & Text1.Text & "'"
>- Do a CreateDynaset with this SQL-sentence:
>    Set MyDS = CreateDynaset( MySQL )
>- Fill your Combo looping through the Dynaset:
>    i = 0
>    MyDS.MoveFirst
>    Do Until MyDS.EOF
>        List1.AddItem MyDS.Fields("MyField").Value, i
>        MyDS.MoveNext
>        i = i + 1
>    Loop

This will work fine until you hit the listbox's internal memory limit.
You say your table is large so you may hit that limit immediately.

If your on a tight budget then there seem to be plenty of
share/freeware list boxes on the usual VB sites that dont have the
memory restriction.

Alternatively you could get a commercial VBX like Sheridan Data
Widgets (be aware that the Sheridan combo/lists can't be used in
non-bound mode but the grid can). There are plenty of others on the
market so I'd browse the 3rdparty news group for opinions.



Thu, 22 Jan 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Getting data from a list box

2. Getting data from a list or combo box

3. getting data from access database table to VB4 list box

4. name of one list item is longer than the width of the list box

5. getting list of directories into list box

6. vbscript dynamic list box

7. WithEvents on Dynamic List Box's

8. Dynamic List Box??

9. Dynamic List Box??

10. Displaying Records in List Box as Data is input to Text Box on Form

11. Dynamic (on Run Time) refresh of combo box data

12. Dynamic (on Run Time) refresh of combo box data

 

 
Powered by phpBB® Forum Software