PC Review


Reply
Thread Tools Rate Thread

ACCESS table linked to EXCEL spreadsheet. How to know which table is linked?

 
 
Art
Guest
Posts: n/a
 
      1st Apr 2007
Hi folks -

Could you please help. I have Excel templates that pull data from
ACCESS (make table queries).

In Excel I go to DATA -> IMPORT EXTERNAL DATA -> EDIT QUERY where i am
trying to find from the list (~100 ) of tables which table is
participationg in a query. Tables unfortunately are not named
appropriately.

The only information I have is the list of fields.

The person who created all databases and templates is not with my
company anymore. ACCESS databases and Excel templates are not
documented.

My question: Is there any easiest way to find which ACCESS table is
linked to the EXCEL template?

Thanks,

Artem

 
Reply With Quote
 
 
 
 
Douglas J. Steele
Guest
Posts: n/a
 
      1st Apr 2007
Try the following VBA:

Dim dbCurr As DAO.Database
Dim tdfCurr As DAO.TableDef

Set dbCurr = CurrentDb()
For Each tdfCurr In dbCurr.TableDefs
If Len(tdfCurr.Connect) > 0 Then
Debug.Print tdfCurr.Name & " is linked to " & tdfCurr.Connect
End If
Next tdfCurr

Look in the Immediate window (Ctrl-G) to see the results.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)


"Art" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi folks -
>
> Could you please help. I have Excel templates that pull data from
> ACCESS (make table queries).
>
> In Excel I go to DATA -> IMPORT EXTERNAL DATA -> EDIT QUERY where i am
> trying to find from the list (~100 ) of tables which table is
> participationg in a query. Tables unfortunately are not named
> appropriately.
>
> The only information I have is the list of fields.
>
> The person who created all databases and templates is not with my
> company anymore. ACCESS databases and Excel templates are not
> documented.
>
> My question: Is there any easiest way to find which ACCESS table is
> linked to the EXCEL template?
>
> Thanks,
>
> Artem
>



 
Reply With Quote
 
 
 
 
usenet.ca@gmail.com
Guest
Posts: n/a
 
      1st Apr 2007
On Apr 1, 11:14 am, "Douglas J. Steele"
<NOSPAM_djsteele@NOSPAM_canada.com> wrote:
> Try the following VBA:
>
> Dim dbCurr As DAO.Database
> Dim tdfCurr As DAO.TableDef
>
> Set dbCurr = CurrentDb()
> For Each tdfCurr In dbCurr.TableDefs
> If Len(tdfCurr.Connect) > 0 Then
> Debug.Print tdfCurr.Name & " is linked to " & tdfCurr.Connect
> End If
> Next tdfCurr
>
> Look in the Immediate window (Ctrl-G) to see the results.
>
> --
> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> (no private e-mails, please)
>
> "Art" <saskatoon...@gmail.com> wrote in message
>
> news:(E-Mail Removed)...
>
>
>
> > Hi folks -

>
> > Could you please help. I have Excel templates that pull data from
> > ACCESS (make table queries).

>
> > In Excel I go to DATA -> IMPORT EXTERNAL DATA -> EDIT QUERY where i am
> > trying to find from the list (~100 ) of tables which table is
> > participationg in a query. Tables unfortunately are not named
> > appropriately.

>
> > The only information I have is the list of fields.

>
> > The person who created all databases and templates is not with my
> > company anymore. ACCESS databases and Excel templates are not
> > documented.

>
> > My question: Is there any easiest way to find which ACCESS table is
> > linked to the EXCEL template?

>
> > Thanks,

>
> > Artem- Hide quoted text -

>
> - Show quoted text -


Thanks-

Sorry for a trivial question. Where I should insert the VBA code?

Artem

 
Reply With Quote
 
Douglas J. Steele
Guest
Posts: n/a
 
      2nd Apr 2007
Create a sub in a module (not a class module) and then run it from the
Immediate window. No need to save it if you're not going to need to run it
again.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


<(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> On Apr 1, 11:14 am, "Douglas J. Steele"
> <NOSPAM_djsteele@NOSPAM_canada.com> wrote:
>> Try the following VBA:
>>
>> Dim dbCurr As DAO.Database
>> Dim tdfCurr As DAO.TableDef
>>
>> Set dbCurr = CurrentDb()
>> For Each tdfCurr In dbCurr.TableDefs
>> If Len(tdfCurr.Connect) > 0 Then
>> Debug.Print tdfCurr.Name & " is linked to " & tdfCurr.Connect
>> End If
>> Next tdfCurr
>>
>> Look in the Immediate window (Ctrl-G) to see the results.
>>
>> --
>> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
>> (no private e-mails, please)
>>
>> "Art" <saskatoon...@gmail.com> wrote in message
>>
>> news:(E-Mail Removed)...
>>
>>
>>
>> > Hi folks -

>>
>> > Could you please help. I have Excel templates that pull data from
>> > ACCESS (make table queries).

>>
>> > In Excel I go to DATA -> IMPORT EXTERNAL DATA -> EDIT QUERY where i am
>> > trying to find from the list (~100 ) of tables which table is
>> > participationg in a query. Tables unfortunately are not named
>> > appropriately.

>>
>> > The only information I have is the list of fields.

>>
>> > The person who created all databases and templates is not with my
>> > company anymore. ACCESS databases and Excel templates are not
>> > documented.

>>
>> > My question: Is there any easiest way to find which ACCESS table is
>> > linked to the EXCEL template?

>>
>> > Thanks,

>>
>> > Artem- Hide quoted text -

>>
>> - Show quoted text -

>
> Thanks-
>
> Sorry for a trivial question. Where I should insert the VBA code?
>
> Artem
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access 2007 - Copy linked table to a local table or have linked tableas read-only Stuart Microsoft Access 0 26th May 2012 10:28 PM
ACCESS table linked to EXCEL spreadsheet. How to know which table is linked? Art Microsoft Excel Discussion 3 1st Apr 2007 10:14 PM
smiley insertion program for OE - I know, I know, I know! spoon2001 Freeware 0 18th Sep 2005 06:29 PM
Help updating table from linked table(linked table is a csv) Thierry Microsoft Access Queries 2 29th Jun 2004 02:21 PM
UPDATE a linked access table with value from a ODBC linked SQL table JB Microsoft Access 0 18th Nov 2003 10:27 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:56 AM.