473,387 Members | 1,495 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.

Function/Routine to determine the directory of a linked database

I have a database that contains linked tables from a second database.
I want to programmatically determine the directory the second database
resides in based on what is entered into the Linked Tables screen.
Does anybody know a function or routine that can do this?

Thanks in advance for any help!
Nov 13 '05 #1
4 1312
Parse it from the Connect property of the TableDef, e.g.:
? CurrentDb().TableDefs("MyLinkedTable").Connect

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Mike I." <mi****@earthlink.net> wrote in message
news:7a**************************@posting.google.c om...
I have a database that contains linked tables from a second database.
I want to programmatically determine the directory the second database
resides in based on what is entered into the Linked Tables screen.
Does anybody know a function or routine that can do this?

Thanks in advance for any help!

Nov 13 '05 #2
I will give that a try. Thank you! As you can tell I am a newbie!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #3

I tried using the following code and it returns nothing.
Am I missing something? I know if I did a Currentdb.Name I get the
directory of the current database, but "Customer" is in a linked DB and
that's the directory path I need.

CurrentDb.TableDefs("Customer").Connect

Thanks for the assistance!!!
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 13 '05 #4
Mike Ihrke wrote:
I tried using the following code and it returns nothing.
Am I missing something? I know if I did a Currentdb.Name I get the
directory of the current database, but "Customer" is in a linked DB and
that's the directory path I need.

CurrentDb.TableDefs("Customer").Connect

Thanks for the assistance!!!


Is "Customer" a linked table in your app?

If Customer is linked, you could enter
msgbox CurrentDb.TableDefs("Customer").Connect
or
Dim strConnect As String
strConnect = CurrentDb.TableDefs("Customer").Connect
msgbox strConnect

This will return the connection string which will contain the name of
the database.
Nov 13 '05 #5

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

Similar topics

9
by: Penn Markham | last post by:
Hello all, I am writing a script where I need to use the system() function to call htpasswd. I can do this just fine on the command line...works great (see attached file, test.php). When my...
20
by: Neil | last post by:
I have an Access 2000 MDB file with a SQL 7 back end. I have a main table with 50,000 records; and I have a selections table with 50,000 records for each machine that uses the database (about...
23
by: Neil | last post by:
I have an Access 2000 MDB file with a SQL 7 back end. I have a main table with 50,000 records; and I have a selections table with 50,000 records for each machine that uses the database (about...
6
by: ARC | last post by:
I'm almost ready to build an upgrade routine for a commercial app that will need to import data from an existing Access 97 back-end database to an Access 2007 back-end blank database. Ideally, it...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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...

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.