Selasa, 21 Agustus 2012

RE: [MS_AccessPros] Changing links to multiple back ends

 

Adam-

My code, as does most sample relink code, assumes all Access tables link to the
same file name. It should be easy to modify the code to look for one of the
databases in one of several default *path* locations after a test open fails.
If you can't find the path in a default location, prompt the user to specify the
path using a Windows dialog. When you have the path, pick up the file name from
the existing Connect before rebuilding the DATABASE= part to do the RefreshLink.

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 AdamF
Sent: Tuesday, August 21, 2012 11:23 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Changing links to multiple back ends

I've been reading through the code in John's code in Inside Out and at
http://tech.groups.yahoo.com/group/MS_Access_Professionals/message/99444, as
well as Bill's at
http://tech.groups.yahoo.com/group/MS_Access_Professionals/message/99443

I have 3 separate back ends with different data (can explain that and you can
try to get me to change that later). When the sales manager travels, he takes a
local copy of the database with him. He first copies the back ends to a local
drive, then I update the links. I'd like to automate this.

First, how would I automate copying, for example, g:\datafile1.mdb,
g:\datafile2.mdb, etc., to c:\localfolder?

Second, using either of your codes above, I'd need to get the file name of each
table to use when I reconnect to the same table in a local file. What's the code
for doing that? It's not, but something like
stFileName = tdf.dbAttachedTable.FileName

Adam
Denver, CO

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

Yahoo! Groups Links

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar