Guy-

Why do Linked Tables have to do with an ASP?  All you need do is change the
Connect property setting in the code of each ASP to point to where the
database will be (the actual data tables, not the linked ones) on the web
server.

John Viescas, author
"Building Microsoft Access Applications"
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Guy Harley
Sent: Wednesday, December 21, 2005 12:09 AM
To: [email protected]
Subject: RE: [ms_access] Linked Tables

Thanks John, but it didn't work. It wants a full path and it then follows
the path to check that the file exists. I'm beginning to wonder if there is
some way to do it via an ASP page so that the change takes place after the
databases are in situ.

Guy Harley

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of John Viescas
Sent: Wednesday, 21 December 2005 2:46 PM
To: [email protected]
Subject: RE: [ms_access] Linked Tables

Guy-
You need to edit the Connect property of the TableDef object - you can't
mess with MSysObjects.  Open the Immediate Window (Ctrl+G) and enter:

?CurrentDb.TableDefs("<your linked table name here>").Connect

That should show you something like:

;DATABASE=C:\My Documents\Databases\database2.mdb

Write a little sub to loop through the TableDefs and reconnect them:

Public Sub FixConnect()
Dim db As DAO.Database, tdf As DAO.TableDef

  Set db = CurrentDb
  For Each tdf In db.TableDefs
    If (tdf.Attributes And dbAttachedTable) Then
      tdf.Connect = ";DATABASE=database2.mdb"
      tdf.RefreshLink
    End IF
  Next tdf
  Set tdf = Nothing
  Set db = Nothing
End Sub

But I'm not sure that will work without a reference to a specific path.  Try
it and let me know how it works out.

John Viescas, author
"Building Microsoft Access Applications"
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/ 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf
Of Guy Harley
Sent: Tuesday, December 20, 2005 8:30 PM
To: [email protected]
Subject: [ms_access] Linked Tables

I have 2 databases - one has links to tables in the other database. MS
Access records the filename of the second table as an absolute path (e.g.
C:\My Documents\Databases\database2.mdb). Because I am uploading the
databases to the web, I need to record the filename as a relative path (i.e.
just database2.mdb because they are in the same directory). The data is
contained in the column "Databases" in MSysObjects but if I try to edit this
I get the message "Control can't be edited; it's bound to replication system
column 'Database'." The first database is not replicated although the second
is a replica. 

Any suggestions, please? 

Guy Harley 




 
Yahoo! Groups Links



 






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/KIlPFB/vlQLAA/TtwFAA/q7folB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/ms_access/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to