PC Review


Reply
Thread Tools Rate Thread

Linked Table value

 
 
hmlim
Guest
Posts: n/a
 
      7th Jul 2003
Hi, all
anybody know how to get a linked table path value using VBA code?
I have a table is a linked table, inside my VBA code, I need to know
where the external source for linked table, can anybody help?


hmlim


 
Reply With Quote
 
 
 
 
Cameron Sutherland
Guest
Posts: n/a
 
      7th Jul 2003
Here is some DAO code that will do waht you need:

Dim db As Database
Dim varTable As Variant
Dim strTableName As String
Dim strFileAndPath As String
Set db = CurrentDb
For Each varTable In db.TableDefs
If Len(varTable.Connect) > 1 Then 'its a linked table
strTableName = varTable.Name
'linked tables start with ";DATABASE="
'so we need to strip that away
strFileAndPath = Mid(varTable.Connect, 11, Len
(varTable.Connect) - 10)
End If
Next
Set db = Nothing

-Cameron Sutherland

>-----Original Message-----
>Hi, all
> anybody know how to get a linked table path value

using VBA code?
> I have a table is a linked table, inside my VBA code,

I need to know
>where the external source for linked table, can anybody

help?
>
>
>hmlim
>
>
>.
>

 
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 Access 3 2nd Apr 2007 12:51 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
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 09:14 PM.