dbTalk Databases Forums  

Getting path and file name property of a linked table

comp.databases.ms-access comp.databases.ms-access


Discuss Getting path and file name property of a linked table in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bob
 
Posts: n/a

Default Getting path and file name property of a linked table - 12-07-2010 , 06:09 PM






I am having trouble getting the properties of a table. I have an
Access.mdb front-end with the data tables linked from a back-end
access.mdb file. My users do not always have the linked file on the
same drive or folder. I want to find the path to the linked back-end
tables. (They are all in the same file.) I notice the tables have the
path in the description property of the table. I don't know how to
get that property in VBA so I can then copy the file to a string
variable to be able to back it up from the front end program when they
exit the switchboard. If it were a form that would be easy: forms!
formname.property. I am using Access 2007 but have not yet converted
the program files to .accdb. Any help will be appreciated. I am just
not very experienced yet.

Bob B.

Reply With Quote
  #2  
Old   
Stuart McCall
 
Posts: n/a

Default Re: Getting path and file name property of a linked table - 12-07-2010 , 07:12 PM






"Bob" <beaudet (AT) usc (DOT) edu> wrote

Quote:
I am having trouble getting the properties of a table. I have an
Access.mdb front-end with the data tables linked from a back-end
access.mdb file. My users do not always have the linked file on the
same drive or folder. I want to find the path to the linked back-end
tables. (They are all in the same file.) I notice the tables have the
path in the description property of the table. I don't know how to
get that property in VBA so I can then copy the file to a string
variable to be able to back it up from the front end program when they
exit the switchboard. If it were a form that would be easy: forms!
formname.property. I am using Access 2007 but have not yet converted
the program files to .accdb. Any help will be appreciated. I am just
not very experienced yet.

Bob B.
You'll find what you want in the tabledef's connect property:

Debug.Print CurrentDb.TableDefs("MyTable").Connect

Replace MyTable with the name of your table. Switch to the VBA editor
(Ctrl-G) and look in the immediate window.

Reply With Quote
  #3  
Old   
Bob
 
Posts: n/a

Default Re: Getting path and file name property of a linked table - 12-08-2010 , 04:45 PM



On Dec 7, 5:12*pm, "Stuart McCall" <smcc... (AT) myunrealbox (DOT) com> wrote:
Quote:
"Bob" <beau... (AT) usc (DOT) edu> wrote in message

news:afb38fe5-7fc5-4e5b-a4d2-66cdf1baa906 (AT) e16g2000pri (DOT) googlegroups.com...

I am having trouble getting the properties of a table. *I have an
Access.mdb front-end with the data tables linked from a back-end
access.mdb file. *My users do not always have the linked file on the
same drive or folder. *I want to find the path to the linked back-end
tables. (They are all in the same file.) *I notice the tables have the
path in the description property of the table. *I don't know how to
get that property in VBA so I can then copy the file to a string
variable to be able to back it up from the front end program when they
exit the switchboard. If it were a form that would be easy: forms!
formname.property. I am using Access 2007 but have not yet converted
the program files to .accdb. *Any help will be appreciated. *I am just
not very experienced yet.

Bob B.

You'll find what you want in the tabledef's connect property:

Debug.Print CurrentDb.TableDefs("MyTable").Connect

Replace MyTable with the name of your table. Switch to the VBA editor
(Ctrl-G) and look in the immediate window.
Stuart,

Thanks. That worked like a charm until I started getting "permission
denied" for no explained reason.

Bob

Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.