Results 1 to 2 of 2

Thread: Displaying record sources (access tables) in a list box **RESOLVED**

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2003
    Posts
    13

    Displaying record sources (access tables) in a list box **RESOLVED**

    Hi,

    I have a program that takes a list of users, creates a username base on the name and then checks data exported from User Manager to see if that username exists.

    I want to make this more user friendly and have the database name, record source selected from a form.

    Now, I have created a directory and file list box which works fine, however I want to go that one step further and have a box that will then display the tables within the database selected.

    The reason is that although I know how to change the properties of the data sources, someone else may not, and could end up doing more damage. Therefore a interface to set these would be better.

    Is there a control similar to the directory/file list boxes, or does anyone know any code or links to this .

    TIA

    Andrew
    Last edited by pezza; Sep 7th, 2003 at 05:14 PM.

  2. #2

    Thread Starter
    New Member
    Join Date
    Jul 2003
    Posts
    13
    I have managed to solve this.

    I created a list box and used the following code....

    Dim tbldef As DAO.TableDef
    Dim db As DAO.Database
    Set db = DAO.OpenDatabase(File1)
    For Each tbldef In db.TableDefs
    If Not Mid$(tbldef.Name, 1, 4) = "MSys" Then
    List1.AddItem tbldef.Name
    End If
    Next tbldef

    Thanks anyway

Posting Permissions

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



Click Here to Expand Forum to Full Width