Increase spead adding Access db Record to Word VBA listbox 
Author Message
 Increase spead adding Access db Record to Word VBA listbox

Hi,

How can i increase the spead to get records from Access DB to a Word VBA
Listbox.

Should i use some kind of Index or should i use something else instead of
the SQL statements?
(i am using dao 3.6)

Who can help me

Many Thanks,

Wilbert

Option Explicit

Public ws As Workspace
Public rs As Recordset
Public db As Database
Public DBPad As String

Sub GetItems()
Dim strSQL As String

    DBPad = "G:\Data\Programmeren\VBA\RIS\RIS DB.mdb"
    Set ws = dbEngine.CreateWorkspace("MijnWerkruimte", "admin", "")
    Set db = ws.OpenDatabase(DBPad)

    strSQL = "SELECT tbBeheerder.BEHCD, tbBeheerder.OMSCHR FROM tbBeheerder
"
    strSQL = strSQL & "ORDER BY tbBeheerder.BEHCD;"

    Set rs = db.OpenRecordset(strSQL, dbOpenDynaset)

    Do Until rs.EOF
        Userform.lstItems.AddItem CStr(rs("BEHCD")) & " " &
CStr(rs("OMSCHR"))
        rs.MoveNext
    Loop

    frmBeheerderLijst.lstBeheerder.ListIndex = 0

End Sub



Tue, 24 Sep 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. word VBA won't let me add a new record to an access table

2. Error Received when adding record to a Access DB

3. Adding records to an Access db problem

4. Adding records to server-side Access db

5. VB5/Access DB Add a record

6. Adding new Records to Access DB using ADO/Jet4.0

7. Fastest way to add records to Access 2000 db

8. Can't add records to an Access db

9. Executing a Records from Word VBA using an Access UDF

10. Using Access VBA to add multiple records in a loop to a table from a form

11. Running excel add-in (added into excel - not access) in Access VBA

12. VBA code adding 6 blank lines after adding pragraphs - Word 97

 

 
Powered by phpBB® Forum Software