473,387 Members | 3,810 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,387 software developers and data experts.

Linked Tables path.

Hi,

I have my front and back end database (they are in development) on a network
drive. Everytime I start the database up I get #Error? on DLookup objects
and such. This is solved by 'updating' the tables through the Linked Table
Manager. The path is S:\databaseBE.mdb. Can I just not set the path to
database.BE.mdb?

Because when i distribute the database to others users, the back end
database is going to be in the same folder as the front end database, and on
top of that they are probobly not going to have network drives, especially
ones with the drive letter 'S' if you get me.

I also have that problem with linked images. I have a report that keeps
changing the path I specify. I specify db_files\logo.JPG and access keeps
changing it to the full path (eg: S:\db_files\logo.jpg).

Any thoughts and help would be appreciated. thanks!

--

Kind Regards...

Customer Services Team
Blue Bell Trading

+++ WHEN REPLYING PLEASE DO NOT DELETE ANY OF THE TEXT AS WE NEED IT FOR
REFERENCE +++

Blue Bell Trading
Nov 13 '05 #1
1 4053
AP
I havent used this for a whiile, but I used to setup a button to
refresh links it would open a form with a text box where the user could
browse to the back end db and press OK, then the following code would
run. It basically would check for one table and if that table existed
in the backend it woudl continue trying to link to all of the. I would
store the name of the linked tables in a table named 'tblClientTables'

Private Sub cmdLink_Click()
Dim dbs As Database
Dim tdf As TableDef
Dim connections As Recordset
Dim connect_string As String
DoCmd.Hourglass True
' change the connection to the control_information table
' and check if there is a problem with that. If not, change
' all the other connections. If there is, warn user and kick them
back to
' the choose valid connection.

Set dbs = CurrentDb()
Set tdf = dbs.TableDefs("tblEvents") ' Checks for this single table
to make sure it is a valid backend, replace with any table of your
choice that is in the backend

connect_string = Me.txtFileName ' could add a browse function to
populate this box or type it in manually

tdf.Connect = ";DATABASE=" & connect_string
' Err = 0
' On Error Resume Next
'tdf.RefreshLink ' Relink the table.
'If Err <> 0 Then
' MsgBox "Data path is invalid", , "Operation Cancelled"
'DoCmd.Hourglass False
'Exit Sub
' End If

Set connections = dbs.OpenRecordset("tblClientTables")
If connections.RecordCount = 0 Then
Exit Sub
End If

connections.MoveFirst
While Not connections.EOF
Set tdf = dbs.TableDefs(connections![table_name])

tdf.Connect = ";DATABASE=" & connect_string
Err = 0
On Error Resume Next
tdf.RefreshLink ' Relink the table.
If Err <> 0 Then
MsgBox connect_string & " data path is invalid", , "Operation
Cancelled"
DoCmd.SetWarnings True
DoCmd.Hourglass False
Exit Sub
End If
connections.MoveNext
Wend

MsgBox "Tables Linked to " & connect_string & " were Refreshed", ,
"Operation Successful!"
DoCmd.Hourglass False
DoCmd.Close

Exit_cmdchange_Click:
Exit Sub

Err_cmdchange_Click:
MsgBox Err.Description
Resume Exit_cmdchange_Click

End Sub
Let me know if this works for you.

Nov 13 '05 #2

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

Similar topics

0
by: nosenia | last post by:
Hello- I created a MS Access 2002 database with linked tables on a SQL Server database by way of a File DSN, A. I have created a form which points to one of the linked tables. After I finished...
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...
0
by: Chris Powell | last post by:
I am using Excel/Access 2000 and have two large Excel files (25,000 rows each) that I wish to create linked tables in Access rather than importing into Access. The two source Excel files change...
2
by: Robert McGregor | last post by:
Hi all, I've got a Front End / Back End database that was working just fine. One day i opened the FE to find that if I tried to open one of the linked tables from the database window, nothing...
0
by: Stu | last post by:
I have a few FrontPAGE 2002 Webs running on Windows 2003 Servers and IIS. My webs use ASP (classic) pages that display data pulled from the Access databases using the FrontPage database results...
6
by: RBohannon | last post by:
I'm using Access 2000. I have a DB with 19 tables, and I have just split it. When I look in the back end, all 19 tables are there. However, only 17 of them in the front end are actually linked to...
1
by: fastfish | last post by:
db is split access 2000 trying to replace production front end with the new dev front end different path for the _be (linked tables) in the dev environment than in production when i start...
3
by: sj | last post by:
I have written an application (CW.mde) with a seperate data (Data.mda) file. My Data tables are linked to CW. I want my user to be able to re-link the data.mda when they change location/path of...
25
by: bubbles | last post by:
Using Access 2003 front-end, with SQL Server 2005 backend. I need to make the front-end application automatically refresh the linked SQL Server tables. New tables will be added dynamically in...
3
by: ARC | last post by:
I'm having trouble here with Access 2007 and connecting to a different database. The code below works great IF the previous back-end database connection is still present and you are trying to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.