Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    hide linked tables (Access 2000)

    Can i hide linked tables by code ? Now i am hiding them manually, by right clicking on the linked table and selecting properties and setting the hidden property to yes

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: hide linked tables (Access 2000)

    Hiding tables is useless. Anyone who knows a little bit about Access also knows how to show hidden database objects. Instead, hide the entire database window in Tools | Startup and specify a form to be opened automatically.

    If you still want to do it, use code like this:

    Sub HideLinkedTables()
    Dim dbs As DAO.Database
    Dim tdf As DAO.TableDef
    Set dbs = CurrentDb
    ' Loop through the tables
    For Each tdf In dbs.TableDefs
    ' Is it linked?
    If Not tdf.Connect = "" Then
    ' If so, hide it
    SetHiddenAttribute acTable, tdf.Name, True
    End If
    Next tdf
    Set tdf = Nothing
    Set dbs = Nothing
    End Sub

  3. #3
    4 Star Lounger
    Join Date
    Feb 2002
    Posts
    537
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: hide linked tables (Access 2000)

    Thanks a lot ! I will also hide the window !

Posting Permissions

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