Re: Display what mdb a table is linked to





"Marshall Barton" wrote:

Gary S wrote:

I would like to display what database a table is linked to using code. What
is the easiest way of doing that?


If the real table is in another Access database, you could
use a text box with an expression like:

=Mid(CurrentDb.TableDefs("table name").Connect, 11)

--
Marsh
MVP [MS Access]

You may also consider creating a query on the MSysObjects Table (hidden).
In the query view put the Database field and the Name field. specify under
Database (for criteria) <> ""

This will show your tables and the database they are linked to.

HTH

Terry
.



Relevant Pages

  • Re: Merging data from Access Query
    ... Data from the database will be placed in the document, ... Y/N ?" ... If the query references the Form, ... The process starts in an access database. ...
    (microsoft.public.word.mailmerge.fields)
  • This ones a challenge: 1.9 not equaling 1.9..... Whats going on???
    ... I've got a real challenge this time with an access database that I'm ... I'm writing this database for work, ... column #1 in the query is titled ...
    (microsoft.public.access.queries)
  • Re: Creating forms in Excel to Import access data ! Please reply
    ... File>Table Definition, select your database, and set your query - you can ... also type in SQL directly. ... >> access a query in the Access database. ...
    (microsoft.public.excel)
  • ADO to ADO.NET 2.0
    ... and an Access database. ... In this application, we routinely query multiple ... to the database are implemented by the record set's Update command. ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: Excel - MS Query - changing location of Access data source
    ... > I created a spreadsheet and use MS Query to get data from a Access ... > to the Access database and the query fails because it can't find the ... > to store the path to the database in a cell and use a macro to ...
    (microsoft.public.excel.programming)