Filling a combo drop down from access table 
Author Message
 Filling a combo drop down from access table

I need help in writting code to fill a combo list box from data based on
a MS access97 table.

I used the following code to do the same from a Access 2.0 table with
much success. The same code however does not seem to work with Access97.

*********************************************
Sub qsleader ()
Dim ownerdb As database
Dim ownertbl As table

dbName = {path to database}

Set ownerdb = OpenDatabase(dbName)
Set ownertbl = ownerdb.OpenTable("ClauseLeaders")

Do Until ownertbl.EOF
    lst_QSleader.AddItem ownertbl!Leader
    ownertbl.MoveNext
Loop

ownertbl.Close
ownerdb.Close

End Sub
*********************************************

I would appreciate any guidance you may provide on this problem.

        - Mario Diaz -



Fri, 24 Nov 2000 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Drop Down Combo box with smaller down arrow icon

2. Connect to Access table & fill combo box

3. Fill Combo with values from an access table

4. Drop Down menu auto filling date elsewhere

5. Fill drop-down menu with elements of Dbase

6. filling a drop down usinga text file

7. Drop Down List Box - Drop Down portion does not always disappear after Click event

8. Press F1 key while drop-down menu item highlighted, drop-down menu stays on top

9. Data bound drops downs dont drop down!

10. VBA code to go to a bookmarked drop down goes to wrong drop down

11. Combo box drop down on got focus

12. Values in drop-down combo box

 

 
Powered by phpBB® Forum Software