how to code Linked Table Manager actions

  • Thread starter K90267000 via AccessMonster.com
  • Start date
K

K90267000 via AccessMonster.com

Hi all,
May i know how to code the following actions?

ACCCESS 2007:
Choose "Database Tools"
Choose "Linked Table Manager"
Check on "Always prompt for new location"
Click "Select All"
Click "OK"
Select location "C:\1.aaccdb"

Thanks!
 
J

Jerry Whittle

The following will bring up the Link Table Manager to refresh existing links:

Function fLinkTable()
DoCmd.RunCommand acCmdLinkedTableManager
End Function

This will bring up the dialog to start linking a new table:

Function fLinkNewTable()
DoCmd.RunCommand acCmdLinkTables
End Function

I believe that the above will still work with A07.

Not the complete answer. After that SendKeys "might" do the rest for you. I
haven't tried SendKeys lately.
 
K

K90267000 via AccessMonster.com

Thanks!
I will tried using your code..
however, regarding using sendkeys after the dialog....
i will need to "check" on the checkbox for "Always prompt for new location"
in the dialog,
and "click" the "select all" ,
and "click" on the OK.
i am not sure how can i do that.
thanks for your help!


Jerry said:
The following will bring up the Link Table Manager to refresh existing links:

Function fLinkTable()
DoCmd.RunCommand acCmdLinkedTableManager
End Function

This will bring up the dialog to start linking a new table:

Function fLinkNewTable()
DoCmd.RunCommand acCmdLinkTables
End Function

I believe that the above will still work with A07.

Not the complete answer. After that SendKeys "might" do the rest for you. I
haven't tried SendKeys lately.
Hi all,
May i know how to code the following actions?
[quoted text clipped - 8 lines]
 
G

George Nicholson

If you aren't actually using the Linked table manager to capture user
responses, then why bother using it at all?

Tables: Relink Access tables from code
http://mvps.org/access/tables/tbl0009.htm

--
HTH,
George


K90267000 via AccessMonster.com said:
Thanks!
I will tried using your code..
however, regarding using sendkeys after the dialog....
i will need to "check" on the checkbox for "Always prompt for new
location"
in the dialog,
and "click" the "select all" ,
and "click" on the OK.
i am not sure how can i do that.
thanks for your help!


Jerry said:
The following will bring up the Link Table Manager to refresh existing
links:

Function fLinkTable()
DoCmd.RunCommand acCmdLinkedTableManager
End Function

This will bring up the dialog to start linking a new table:

Function fLinkNewTable()
DoCmd.RunCommand acCmdLinkTables
End Function

I believe that the above will still work with A07.

Not the complete answer. After that SendKeys "might" do the rest for you.
I
haven't tried SendKeys lately.
Hi all,
May i know how to code the following actions?
[quoted text clipped - 8 lines]
 
K

K90267000 via AccessMonster.com

Thanks for responding!

I want to have a universal front-end that is to be used by 3 different
computers (CompA, CompB, CompC)
Each computers will have a different back-end database (Backend A,B,C)

When user at CompA will click buttonA, the front-end links to BackendA.
When user at CompB will click buttonB, the front-end links to BackendB.
When user at CompC will click buttonC, the front-end links to BackendC.

Currently, I have customised front-end (frontend A,B,C) , which is not ideal
to me.

Any help is appreciated!
Thanks!


George said:
If you aren't actually using the Linked table manager to capture user
responses, then why bother using it at all?

Tables: Relink Access tables from code
http://mvps.org/access/tables/tbl0009.htm
Thanks!
I will tried using your code..
[quoted text clipped - 30 lines]
 
G

George Nicholson

The code at the link I provided is just a starting point. It can be adapted
and expanded in many ways.

Here are a couple of approaches, off the top of my head.

If you want to inforce "UserA always links to BackendA", then you could
create a table in the fe that would contain all the expected computer/user
names and the corresponding be path, then adapt the code to dlookup the
appropriate be path and link to it on startup. If the computer/user isn't in
the list, shut down the app. (The linked site also has code in the API
section to retrieve the current computer name and the windows login name of
the current user).

Or

If you want to allow your users a choice of be, then create your 3 buttons
and have them link to the appropriate location, as specified in either a fe
table or a be table (that resides in all 3 bes).

Variations are endless.

--
HTH,
George



K90267000 via AccessMonster.com said:
Thanks for responding!

I want to have a universal front-end that is to be used by 3 different
computers (CompA, CompB, CompC)
Each computers will have a different back-end database (Backend A,B,C)

When user at CompA will click buttonA, the front-end links to BackendA.
When user at CompB will click buttonB, the front-end links to BackendB.
When user at CompC will click buttonC, the front-end links to BackendC.

Currently, I have customised front-end (frontend A,B,C) , which is not
ideal
to me.

Any help is appreciated!
Thanks!


George said:
If you aren't actually using the Linked table manager to capture user
responses, then why bother using it at all?

Tables: Relink Access tables from code
http://mvps.org/access/tables/tbl0009.htm
Thanks!
I will tried using your code..
[quoted text clipped - 30 lines]
 

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