Navigation Pane unhides when creating liked table


H

HarkitsMark

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?
 
Ad

Advertisements

R

Rick Brandt

HarkitsMark said:
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?

Use DAO to create the link instead of TransferDatabase.
 
M

Maurice

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.
 
H

HarkitsMark

Rick

Interesting suggestion. Can you tell me what that DAO statement/code looks
like? Does this actually work or is it just an idea? Thanks
 
A

Armen Stein

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

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: http://ow.ly/M56Q

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
instructions.

Armen Stein
Microsoft Access MVP
www.JStreetTech.com
 
Ad

Advertisements

M

Martin Bastable

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
CurrentDb.TableDefs.Refresh
End Sub

Cheers,

Martin
 
Ad

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. After that, you can post your question and our members will help you out.

Ask a Question

Top