My Assistant
![]() ![]() |
|
|
Apr 7 2006, 07:27 AM
Post
#1
|
|
|
UtterAccess Guru Posts: 637 From: Gloucester UK |
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: |
|
|
|
Apr 7 2006, 08:07 AM
Post
#2
|
|
|
UtterAccess VIP Posts: 2,442 From: @ 8300' in the Colorado Rocky Mountains |
I'm not sure ac2k has this but have you tried DoCmd.RunCommand acCmdLinkedTableManager?
|
|
|
|
Apr 7 2006, 08:11 AM
Post
#3
|
|
|
UtterAccess Guru Posts: 637 From: Gloucester UK |
Hi RuraGuy
Nice try - but no cigar on this occasion - Ac2000 doesn't support this command Thanks anyway John |
|
|
|
Apr 7 2006, 08:33 AM
Post
#4
|
|
|
UtterAccess VIP Posts: 2,442 From: @ 8300' in the Colorado Rocky Mountains |
Phooey! I can't find a DoMenuItem version either. Sorry.
|
|
|
|
Apr 7 2006, 10:43 AM
Post
#5
|
|
|
UtterAccess VIP Posts: 5,200 From: Denver, Colorado [USA] |
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 |
|
|
|
Apr 7 2006, 10:51 AM
Post
#6
|
|
|
UtterAccess Guru Posts: 637 From: Gloucester UK |
Hi schroep
What a star you are - very many thanks to you Cheers - have a great weekend John |
|
|
|
Apr 7 2006, 11:34 AM
Post
#7
|
|
|
UtterAccess VIP Posts: 5,200 From: Denver, Colorado [USA] |
Glad to help.
|
|
|
|
![]() ![]() |
|
Go to Top · Lo-Fi Version | Time is now: 19th June 2013 - 03:06 AM |