Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / March 2008

Tip: Looking for answers? Try searching our database.

Create New Link to External Database Table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jsccorps - 19 Apr 2007 21:46 GMT
Need to programmatically link a new table to an external DB.  First, I  would
export the table to the backend, and then I want to create a link to this
table.  I know how to Refresh an existing link (using code that I found on
this site), but can't figure out how to create a new link.
Albert D. Kallal - 19 Apr 2007 21:58 GMT
> Need to programmatically link a new table to an external DB.  First, I
> would
> export the table to the backend, and then I want to create a link to this
> table.  I know how to Refresh an existing link (using code that I found on
> this site), but can't figure out how to create a new link.

Is this for a new front end? why not just put the linked table in on your
machine. and then have your code copy the new table..and your table link
will already be there in place...

I simply have the new tables the font  end append with a CC. So, the table
name in the new front end is different then the back end one. I then copy
the table from the front to the back..and re-name it in the process.

eg:

     strFromDB = CurrentProject.FullName
     strToDB = strBackEnd

     DoCmd.TransferDatabase acExport, "Microsoft Access", strToDB, acTable,
"tblGroupRemindC", "tblGroupRemind", True

Since I already linked the table on my production machine, then during
deployment, I don't have to create the link, but just copy the above
table....

There is some example code here that does create a link:

http://www.granite.ab.ca/access/temptables.htm

Signature

Albert D. Kallal    (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com

jsccorps - 19 Apr 2007 22:44 GMT
thanks for replying.

This is for an existing DB that is in the field.  I need to add a new table
to the Backend, and then link the Frontend to the new table.

> > Need to programmatically link a new table to an external DB.  First, I
> > would
[quoted text clipped - 25 lines]
>
> http://www.granite.ab.ca/access/temptables.htm
Albert D. Kallal - 21 Apr 2007 00:17 GMT
> thanks for replying.
>
> This is for an existing DB that is in the field.  I need to add a new
> table
> to the Backend, and then link the Frontend to the new table.

Ah, then you really don't need code to crate the link...do you???

Simply link to the backend on your production machine (that already has this
table).

That link is now valid.

Of course, your start up code checks for this table..and if it is not
present..then you use the transfer database code example I used....

Once you transfer that new table to the back end, then the link should be
ok....

Signature

Albert D. Kallal    (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@msn.com

N.Ordiers - 07 Mar 2008 20:33 GMT
Albert,

I am in what appears to be the same problems, I have one front end database
that needs to CREATE NEW LINKS from two different databases. I follow your
suggestions in looking at the website you previously mention but I did not
see any relevant code to creat e a new link using Access 2003. Any help is
appreciated

> > thanks for replying.
> >
[quoted text clipped - 14 lines]
> Once you transfer that new table to the back end, then the link should be
> ok....
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.