Full Version: Trouble with calling 'Linked Table Manager'
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
Berty
Hi Folks - I'm perplexed

I have a database where the forms are Pop-up's
Much of the data is supplied by linked Excel spreadsheets.
The users are likely to need to re-establish the links to the spreadsheets so.....

I want the user to be able to press a button and the Linked Table Manager to appear.

I have a function as follows:
CODE
Public Function Links()
On Error GoTo Err_Links

SendKeys "%TDL"

Exit_Links:
    Exit Function

Err_Links:
    
    MsgBox "Action Cancelled", , "RAMSyS"
    Resume Exit_Links
    
End Function


This is called by an autokeys macro when F1 is pressed (works OK when in design mode - but not when the forms are loaded)

I have tried having a button with SendKeys"%TDL" as the code - but nothing


Your help would be very much appreciated.

Cheers


John
I currently have this code attached to a button:
RuralGuy
I'm not sure ac2k has this but have you tried DoCmd.RunCommand acCmdLinkedTableManager?
Berty
Hi RuraGuy

Nice try - but no cigar on this occasion - Ac2000 doesn't support this command

Thanks anyway


John
RuralGuy
Phooey! I can't find a DoMenuItem version either. Sorry.
schroep
SendKeys is very tempermental. The particular keys you are sending are only going to function if:

1) You have left the user the standard Access menus to use (since you are attempting to navigate through the menu by emulating keystrokes).
2) You haven't mapped those keys to something else in your form or app.
3) Nothing else fires while that code is running that might grab those keys.

For these and many other reasons, SendKeys is highly recommended not to be used.

This should open up the Linked Table Manager in Access2000 and AccessXP:
Application.Run "acwztool.att_Entry"

Also, see if something here helps for an alternate way to relink tables:
http://www.mvps.org/access/tables/tbl0009.htm
Berty
Hi schroep

What a star you are - very many thanks to you

Cheers - have a great weekend


John
schroep
Glad to help.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.