Results 1 to 6 of 6
  1. #1
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615

    Can linked table location be hidden?

    Good morning all -



    Is it possible to hide the locations of linked tables that we see when using linked table manager? I want to have a desktop Access FE database link to a BE database which is on an intranet server. I know this works because I have done it, but for security reasons can the link address be hidden? That is really a just-in-case scenario, because I can establish the links when opening the main form, and delete them when closing it. It's also easy enough to keep users out of the ribbon and the navigation pane.

    If that can't be done, is it possible using VBA to map the database location to a network drive letter, as you can do with Computer - Map Network Drive (Win 7), without knowing what drive letter is the next one available?

    Thanks.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,967
    If users are not in the ribbon or navigation pane, how are they interacting with the link manager?

    Why are you establishing and deleting links?

    I use UNC pathing in my frontend linking and don't have to deal with user's drive letter mapping.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    If you use VBA to hide the objects, they will not appear. This is unlike using the Options to change the hidden property.

  4. #4
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Thank you, ItsMe - worked great (once I found the right VBA code!!)

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,743

  6. #6
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Sorry, yes. Here you are:

    Code:
    Sub Link_Tables(Optional HideTable As Boolean = True)
       
      Dim wksp As Workspace
      Dim TableName As String
      
      '
      ' Open the specifications database
      '
      Set wksp = Workspaces(0)
      Set SPECSDATABASE = wksp.OpenDatabase(DATABASENAME)
      For Each tbl In SPECSDATABASE.TableDefs
        If Left(tbl.Name, 4) <> "MSys" Then
          Debug.Print "Linking to " & tbl.Name
          DoCmd.TransferDatabase acLink, "Microsoft Access", DATABASENAME, A_TABLE, _
             tbl.Name, tbl.Name
          If HideTable Then Application.SetHiddenAttribute acTable, tbl.Name, True ' will hide the table "tbl.name"
        End If
      Next
      SPECSDATABASE.Close
    End Sub

    DATABASENAME is a global variable containing the database location:

    Global Const DATABASENAME As String = "\\eis-xxx-iv03147\web_sites$\cmpapp\dpgr\access_database\dmh rr\web_dmhrr_specs.mdb"

    This routine is called when the main form of the desktop application is opened.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 9
    Last Post: 10-20-2014, 04:00 PM
  2. Replies: 2
    Last Post: 04-15-2014, 10:03 PM
  3. Replies: 4
    Last Post: 10-07-2012, 08:43 PM
  4. Database table hidden
    By data808 in forum Forms
    Replies: 2
    Last Post: 08-28-2012, 10:15 AM
  5. Replies: 0
    Last Post: 01-18-2011, 07:09 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums