Navigation Pane unhides when creating liked table

Discussion in 'Access Table Design' started by HarkitsMark, Mar 19, 2010.

  1. HarkitsMark

    HarkitsMark Guest

    I have a runtime/accde app to be distributed to users that can't have access
    to the nav pane or objects, and even though I've disabled special keys,
    including shift keys, and turned off the nav pane option, the nav pane
    reappears during app startup. Found out using docmd.transferdatabase acLink
    is the culprit.

    1) does MS know about this and 2) what's the fix if I want to re-create
    table connections during startup behind the scenes?
    HarkitsMark, Mar 19, 2010
    1. Advertisements

  2. HarkitsMark

    Rick Brandt Guest

    Use DAO to create the link instead of TransferDatabase.
    Rick Brandt, Mar 20, 2010
    1. Advertisements

  3. HarkitsMark

    Maurice Guest

    This is indeed a bug and there's no fix for it. Other solution i heard for
    this problem is to use a timer, do the action (transfer) and after the
    transfer hide the navepane via code again.

    It's a workaround not a solution bu maybe it points you to a tem solution.
    Maurice, Mar 20, 2010
  4. HarkitsMark

    HarkitsMark Guest


    Interesting suggestion. Can you tell me what that DAO statement/code looks
    like? Does this actually work or is it just an idea? Thanks
    HarkitsMark, Mar 21, 2010
  5. HarkitsMark

    Armen Stein Guest

    If you want an automated DAO approach to relinking tables, you're
    welcome to use our free J Street Access Relinker on our J Street
    Downloads page:

    It handles multiple Access back-end databases, ignores ODBC linked
    tables, and can automatically and silently relink to back-end
    databases in the same folder as the application (handy for work
    databases or single-user scenarios). There's a ReadMe table with

    Armen Stein
    Microsoft Access MVP
    Armen Stein, Mar 23, 2010
  6. If you havent already solved this, try the following...

    I had the same problem, and no amount of re-hiding or setting database properties helped (till the database was restarted).

    As the problem seemed to be specifically caused by the DoCmd.TransferDatabase, its a case of `how to work around this`.

    You can replace this command with CreateTableDef instead (which also allows linking to tables without PK's without access throwing wobbly messages when linking). It works in the same way enough for my purposes.

    Rather than recoding all my code, I just created my own function that a quick search/replace of docmd.transferdatabase would fix. Pseudoycode below...

    MyTransferDatabase acLink, linktype, connectionstring, , srctablename, destinationtablename

    aclink, linktype are pretty errelevant - they just happened to be in my old docmd.transferdatabase version.

    Public Sub MyTransferDatabase(Optional DataTransferType, Optional DatabaseType, Optional DatabaseName, Optional ObjectType, Optional Source, Optional Destination, Optional StructureOnly, Optional StoreLogin)

    Dim tbl As TableDef
    Set tbl = CurrentDb.CreateTableDef(Destination, dbAttachSavePWD, Source, DatabaseName)
    CurrentDb.TableDefs.Append tbl
    End Sub


    Martin Bastable, Nov 4, 2010
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.