Question Locked

Tables description in database window

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
Can anyone tell me please how I can add a description to a table in the database window from VBA. I have checked all the properties, but Description is not listed and does not seem to be available.

9 replies

by tony hopkinson

Though I must confess it's not something I've tried to do.
You can execute it with a create table statement and you might depending on which DMBS get it in with an alter table statement, a lot of them don't implement it there either.
Which DBMS is it?

by sila80

Thanks for the reply. I am using Access 2003 and VBA, and creating tables "on the fly". The tables contain information about activities which will go to an annual report.

To help the user I want to put a description in the Database Window (sometimes called the Cannister?) so they know what it applies to eg the table name may be "tbl1234" which contains data for the Dept of Interior. I would like to be able to put "Dept of Interior" in the description field.

by tony hopkinson

I'm going to find out though. I will get back, because I thought this would be easy yet I can't google anything useful. Searching for comment is a bad idea (thats' How oracle and mysql do it.
An idea run up access , you can put comments in columns in the table creation form. see if it's help is a help.

Bloody annoying this. I'm one of those guys who wants to know.

by sila80

It can be done manually by right click the table name in the database window, select properties, and add a description. In the TableDef properties (in VBA), there is nothing corresponding, so I am stumped too.

As I am creating the tables for different organisations, it would be nice to be able to do it from VBA.

by tony hopkinson

ad it came up with a stored proc sp_addextendedproperyty or some such. Thelink I found claimed to be the access equivalent.

by sila80

refer to .adp databases. Ordinary Access doesn't use them. Following is from the help

Collections Object type
AllTables All tables
AllFunctions All functions
AllQueries All queries (the count of queries in a Microsoft Access project (.adp) will be zero).
AllViews All views (the count of views in an Access database (.mdb) database will be zero).
AllStoredProcedures All stored procedures (the count of stored procedures in a .mdb database will be zero).
AllDatabaseDiagrams All database diagrams (the count of database diagrams in a .mdb database will be zero).

If I look up the AllTables collection, there is no property listed for "Description" or anything similar, the same as in the TableDefs collection. @#$%^$

by tony hopkinson

smart tags.
The description is n't in the table, the tag is linked to the table as far as I could make out on a quick scan.

This discussion is closed to new replies.