473,410 Members | 1,976 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,410 software developers and data experts.

Relinking Tables - Access 2003

I was uaing some code derived from the Northwind database to relimk tables at
startup.

The code works well in accerss 97/2000, but does not in 2003

Does anyone have any references to a Relinker in Access 2003?

Thanks - AB
Nov 13 '05 #1
1 2197
"ABinBoston" <ab********@aol.com> wrote in message
news:20***************************@mb-m01.aol.com...
I was uaing some code derived from the Northwind database to relimk tables
at
startup.

The code works well in accerss 97/2000, but does not in 2003

Does anyone have any references to a Relinker in Access 2003?


Try this:
--------------------------------------------------
Private Sub Command0_Click()
Dim db As Database, n As Integer, i As Integer
Dim TFileName As String, LinkedTable As TableDef
Dim LocalTableName() As String, TableArray() As String
Set db = CurrentDb

' External database
TFileName = "C:\JollyService_2004\JollyService_T.mdb"
DoCmd.Hourglass True
n = 4
ReDim TableArray(1 To n)

' Tables existing on external database
TableArray(1) = "t_UM"
TableArray(2) = "t_IVA_Aliq"
TableArray(3) = "t_Trasporti"
TableArray(4) = "t_CT"
ReDim LocalTableName(1 To n)

' Names you want to assign to linked tables
LocalTableName(1) = "T1"
LocalTableName(2) = "T2"
LocalTableName(3) = "T3"
LocalTableName(4) = "T4"

' If you want to link external tables with their
' external names use the REMed Set LinkedTable
' instead of the other one.
For i = 1 To n
Set LinkedTable = db.CreateTableDef(LocalTableName(i))
'Set LinkedTable = db.CreateTableDef(TableArray(i))
LinkedTable.Connect = ";DATABASE=" & TFileName
LinkedTable.SourceTableName = TableArray(i)
db.TableDefs.Append LinkedTable
Next i
db.TableDefs.Refresh
DoCmd.Hourglass False
End Sub
---------------------------------------------------------------
Bruno
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Andreas Lauffer | last post by:
I changed from Access97 to AccessXP and I have immense performance problems. Details: - Access XP MDB with Jet 4.0 ( no ADP-Project ) - Linked Tables to SQL-Server 2000 over ODBC I used...
4
by: Ray | last post by:
I have a split DB running on a network, with code to relink to tables on launch of the client is they are broken. Usually, this works fine, but for some reason just hangs if another user is...
6
by: Don Leverton | last post by:
Hi All, I've got a situation where I am developing an Access 97 app for a client, and am in the "beta testing" stage. I have split the app up, using the DB splitter, into front-end /back-end...
1
by: Zlatko Matić | last post by:
Is there any common method for programatical relinking of linked tables?
2
by: Randy | last post by:
I am trying to relink some Oracle tables in an Access database via VB.NET and ADOX. I receive the following error when executing the cat.ActiveConnection link "Arguments are of the wrong type,...
23
by: cmd | last post by:
I use the following code (behind a command button on the FE) to relink from a user's local copy of the BE to the file-server's BE on our LAN. I use this, for example, when a person brings in their...
1
by: shumaker | last post by:
I just need to know gnerally what commands/api I would need to look up documentation for, if this can be done at all. I have some users who take copies of an Access database home with them to do...
13
by: Arno R | last post by:
Hi all, I am deploying an A2k app to users with different versions of Access. Using Access 2000 the relinking on startup (on deploying a new frontend or when backend has changed) is very fast....
0
by: jrhowcroft | last post by:
I have a number of databases in MS Access 97. Some tables in these databases are linked to ODBC tables in Oracle9/10. We would like to change the user name and password on the Oracle tables so each...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.