Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2002
    Location
    The Netherlands
    Posts
    61

    Unanswered: Tables in Listbox

    How can I list my tables in a listbox. So I can select them to fill 4 combo boxes with it's fields.

  2. #2
    Join Date
    Dec 2002
    Posts
    18
    Dim strCurrent as String
    Dim obj As AccessObject, dbs As Object
    Set dbs = Application.CurrentData
    For Each obj In dbs.AllTables
    if not left(obj.Name , 4) = "MSys" Then
    strCurrent = strCurrent & ";" & obj.Name
    End If
    Next obj

    Me.List1.RowsourceType = "Value List"
    Me.List1.ColumnCount = 1
    Me.List1.ColumnWidths = 2
    Me.List1.Rowsource = Mid(strCurrent , 2)


    Last edited by Poppekop; 12-09-02 at 13:05.

  3. #3
    Join Date
    Nov 2002
    Location
    The Netherlands
    Posts
    61
    Thx for the help
    But On my tables page ive got

    Catalog
    Catmanu
    Corpora
    IndivPa
    HivMnt
    ManFact
    ReadmeTxT
    Supmark

    in my listbox ive got

    Catalog
    Corpora
    IndivPa
    MSysAccessObjects
    MSysIMEXColumns
    MSysObjects
    MSysRelationships
    Supmark

    MSys are the system files and there are some tables missing too

    Last edited by DeathWing; 12-09-02 at 09:32.

  4. #4
    Join Date
    Dec 2002
    Posts
    18

    Cool updated answer

    I updated my previous answer. I think your list had two columns with the first column width 0. The if statement ommits the MSys tables.
    Last edited by Poppekop; 12-09-02 at 13:02.

  5. #5
    Join Date
    Nov 2002
    Location
    The Netherlands
    Posts
    61
    It works, Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •