Jumat, 24 Agustus 2012

RE: [MS_AccessPros] Changing links to multiple back ends

 

Glenn-

Typically, the link to another Access table has only the ;DATABASE= argument. A
link to Excel looks like:

Excel 12.0 Xml;HDR=YES;IMEX=2;ACCDB=YES;DATABASE=D:\Microsoft Press\Access 2007
Inside Out\Fictitious Names.xlsx

All you have to change is the DATABASE= part at the end.

I'll have to dink around to find examples of the others, but they're all pretty
much the same.

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Glenn Lloyd
Sent: Friday, August 24, 2012 11:01 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: RE: [MS_AccessPros] Changing links to multiple back ends

Patrick,

In your article you mention that

It will not relink ODBC, Excel, Outlook, dBASE, Paradox or any other type of
linked table or object.

What modifications to your code would be necessary to relink, say, an Excel
workbook?

Glenn

From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of John Viescas
Sent: August-24-12 2:23 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: RE: [MS_AccessPros] Changing links to multiple back ends

And I forgot to mention ...

To point to some other known path, simply substitute it in this line:

tdf.Connect = ";DATABASE=" & CurrentProject.Path & strBackEnd

... for CurrentProject.Path

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
[mailto:MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com> ] On Behalf Of John
Viescas
Sent: Friday, August 24, 2012 8:01 AM
To: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
Subject: RE: [MS_AccessPros] Changing links to multiple back ends

Excellent, Patrick!

Here's a shorter link that avoids the line wrap:

http://tinyurl.com/cot5o74

One minor enhancement to consider - I usually check the attributes rather
than
rely on the presence of a Connect property, like this:

' Looking for attached tables
If (tdf.Attributes And dbAttachedTable) Then

John Viescas, author
Microsoft Office Access 2010 Inside Out
Microsoft Office Access 2007 Inside Out
Building Microsoft Access Applications
Microsoft Office Access 2003 Inside Out
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
[mailto:MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com> ] On Behalf Of Patrick
Wood
Sent: Friday, August 24, 2012 7:53 AM
To: MS_Access_Professionals@yahoogroups.com
<mailto:MS_Access_Professionals%40yahoogroups.com>
Subject: Re: [MS_AccessPros] Changing links to multiple back ends

Hi Adam,

PMFBI but I may be able to help. I recently wrote an article that shows an
easy way to use code to automatically relink to tables in multiple back ends
IF they are all in the same folder as the front end. If that will help you
can read the article and get the code at this link:

http://blogs.office.com/b/microsoft-access/archive/2012/08/03/how-to-automat
ical
ly-relink-microsoft-access-tables-.aspx

Kind Regards,

Patrick Wood

Microsoft Access MVP

Gaining Access Technologies Founder

http://gainingaccess.net

Microsoft Access and SQL Azure Information Center for Developers:

http://gainingaccess.net/SQLAzure/AccessAndSQLAzureInfo.aspx

[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

------------------------------------

Yahoo! Groups Links

[Non-text portions of this message have been removed]

------------------------------------

Yahoo! Groups Links

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar