Property Description of a Linked Table

H

holly

I have coding that allows me to change a tables description in my database:

Public Function ChangeName()
Dim db As Database
Dim tb As String
Set db = CurrentDb
tb = db.TableDefs("Address").Properties("Description")
tb = Now()
db.TableDefs("Address").Properties("Description") = tb
End Function

But when I try to apply this to a linked table it won't do it at all, why is
this? If this is impossible, is there a way to link a table and bring it's
properties description from the database it's linked to, to my current
database?
 
A

Allen Browne

Try this kind of thing:
Set db = OpenDatabase("C:\MyPath\MyFile.mdb")
db.TableDefs("Address").Properties("Description") = "whatever"
db.Close

Note that if the Description has never been set, the property may not exist.
See:
http://allenbrowne.com/AppPrintMgtCode.html#SetPropertyDAO
The custom SetPropertyDAO() function sets the property, including creating
it if it does not exist.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top