CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Guest

    Data Control and Access Tables

    In my program I wrote the code so a CommonDialog box appears so the user can select an Access Database. Now, I want another dialog box to prompt the user so they can select the name of a table in the database file; so I can set the RecordSource property of the Data Control the database is bound to. I dont know how I can get this done.


  2. #2
    Join Date
    Sep 1999
    Location
    Germany
    Posts
    66

    Re: Data Control and Access Tables

    Using this procedure:

    Sub ReadTables()

    Dim tblObj As DAO.TableDef
    Dim sTBLName As String
    Dim bTablesFound As Boolean
    Dim bAttached As Boolean
    Dim nodX$
    Dim bIncludeSysTables As Boolean

    For Each tblObj In dbTest.TableDefs
    If (tblObj.Attributes And dbSystemObject) = 0 Or bIncludeSysTables Then
    sTBLName = tblObj.Name
    List1.AddItem sTBLName
    End If
    Next

    End Sub

    [email protected]
    http://smalig.tripod.com

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

Featured