473,748 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.m db. 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.J PG and access keeps
changing it to the full path (eg: S:\db_files\log o.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 4087
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 'tblClientTable s'

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_informa tion 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.RefreshLin k ' Relink the table.
'If Err <> 0 Then
' MsgBox "Data path is invalid", , "Operation Cancelled"
'DoCmd.Hourglas s False
'Exit Sub
' End If

Set connections = dbs.OpenRecords et("tblClientTa bles")
If connections.Rec ordCount = 0 Then
Exit Sub
End If

connections.Mov eFirst
While Not connections.EOF
Set tdf = dbs.TableDefs(c onnections![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.SetWarnin gs True
DoCmd.Hourglass False
Exit Sub
End If
connections.Mov eNext
Wend

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

Exit_cmdchange_ Click:
Exit Sub

Err_cmdchange_C lick:
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
1937
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 testing it in the development environment I updated the path for all the linked tables to a new File DSN, B. After this action, I opened the form to test adding a new record and the "add new record" navigation button has been disabled. Can...
6
6782
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 the SQL Profile to watch the T-SQL-Command which Access ( who creates the commands?) creates and noticed:
0
8683
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 frequently, so I want to: A) prompt the user, using a custom form, for the specific Excel files to be linked; B) create the links dynamically; C) insert the linked tables into a select query grid and include the SQL statement in the VBA...
2
2693
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 happened (hourglass for about 2 seconds then nothing). I tried relinking the tables and got the same response. (Access even completely bombed out once with a Dr Watson failure).
0
1544
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 wizard - displaying query results, etc. from my main database. It works fine when the database contains the tables/data but when the tables are linked to external tables within *.mdb files (located in the same web folder - /fpdb) or if I split the...
6
1838
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 the back end. When I look at the table objects in the front end, two of them do not have arrows to indicate they are linked. These same two tables do not show up in the Linked Table Manager. If I open the tables in design view and look at...
1
2722
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 the new front end it stops w/ error "can't find linked tables" then bails out w/out giving me a chance to change the path.
3
9824
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 the data.mda. Hence, I have an button with the following: DoCmd.RunCommand acCmdLinkedTableManager The button works on the computer with Ms Access but not those that on
25
45790
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 the future, so the front-end application must have a way to keep up with this (instead of manually linking them).
3
3164
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 connect to a new location (ie: datapath variable below). However, if you remove or even rename the old database, then launch your program, the code fails on the mytable.refreshlink line with an error 3044. (Description of that error is: 'C:\pc
0
8832
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9561
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9381
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8252
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6799
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6078
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3316
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2217
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.