473,386 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

retrieving the description field in Table/Query properties through code

Bob
Hi all,

I write the description of a lot of my tables and queries in the
description section in the properties (when you right click on the
table or query). Is there a method or a property that use use to
retrieve that description from code somehow?

Cheers

Jan 17 '07 #1
4 4489
Bob wrote:
>I write the description of a lot of my tables and queries in the
description section in the properties (when you right click on the
table or query). Is there a method or a property that use use to
retrieve that description from code somehow?

Just refer to the object's Description property:

CurrentDb.TableDefs!tablename.Properties!Descripti on

The tricky part is that you will get a trappable error if
you have not set the description. Just check the error
number and do something appropriate.

--
Marsh
Jan 18 '07 #2
If the table has a Description, you can get it from:
CurrentDb.TableDefs("Table1").Properties.("Descrip tion")

If it has no description, that will generate an error, so use error
handling.

For a query, replace TableDefs with QueryDefs. However, if the query has no
description, Access may get confused and give you the description of one of
the tables in the query instead of recognising that there's none.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Bob" <sc*******@colonialfirststate.com.auwrote in message
news:11**********************@51g2000cwl.googlegro ups.com...
>
I write the description of a lot of my tables and queries in the
description section in the properties (when you right click on the
table or query). Is there a method or a property that use use to
retrieve that description from code somehow?

Cheers
Jan 18 '07 #3
Bob wrote:
Hi all,

I write the description of a lot of my tables and queries in the
description section in the properties (when you right click on the
table or query). Is there a method or a property that use use to
retrieve that description from code somehow?

Cheers
Hi Bob, yes there is:

? dbengine(0)(0).TableDefs("MyTable").Properties("de scription")
? dbengine(0)(0).QueryDefs("MyQuery").Properties("de scription")

Cheers,
--
Smartin
Jan 18 '07 #4
Bob
Thanks everyone!

Smartin wrote:
Bob wrote:
Hi all,

I write the description of a lot of my tables and queries in the
description section in the properties (when you right click on the
table or query). Is there a method or a property that use use to
retrieve that description from code somehow?

Cheers

Hi Bob, yes there is:

? dbengine(0)(0).TableDefs("MyTable").Properties("de scription")
? dbengine(0)(0).QueryDefs("MyQuery").Properties("de scription")

Cheers,
--
Smartin
Jan 19 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: hytga | last post by:
hi can n e 1 tell me if there's a way to get the column properties from a table? properties like caption, description etc thank you
8
by: Vladimir | last post by:
Hello, I have a table in MS Access database. It has one field (with BYTE datatype) that has several properties set in Lookup tab of table Design View. Display Control = Combo Box. Row Source...
3
by: sparks | last post by:
I was copying fields from one table to another. IF the var name starts with milk I change it to egg and create it in the destination table. It works fine but I want to copy the description as...
2
by: Dennis Ruppert | last post by:
I created a routine to read and edit the description properties of tables, (the one you see in the database window). It works just fine. This is the basic code behind it, I substituted all my...
8
by: doomx | last post by:
I'm using SQL scripts to create and alter tables in my DB I want to know if it's possible to fill the description(like in the Create table UI) using these scripts. EX: CREATE TABLE(...
35
by: NickName | last post by:
I understand it's easy to list all saved queries of a given Access database via Msysobjects system table. However, I have not seen any posting over this NG or other similar ones that also include...
1
by: tangus via DotNetMonster.com | last post by:
Hello all, I'm really struggling with getting some Active Directory code to work in ASP.NET. Can you please provide assistance? I am executing the following code: Dim enTry As DirectoryEntry =...
4
by: louishong | last post by:
i'm uisng a master database that has hundreds of tables and links. i would like to create a clean mdb file and only import/link tables from the master database where the description column is like...
9
ADezii
by: ADezii | last post by:
One question which pops up frequently here at TheScripts is: 'How do I retrieve data from a Recordset once I've created it?' One very efficient, and not that often used approach, is the GetRows()...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.