By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,103 Members | 1,524 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,103 IT Pros & Developers. It's quick & easy.

Documenter include Query Property-Description (2003)

GuinessFan
P: 2
In the query design, choose: View | Properties. There is a field 'Description'. I've run the documenter and listed query def items in DBO, but this description is not one of the items.

Does anyone know a way to use this in any sort of printout or document? I can find everything else using code from another post.
Jun 23 '08 #1
Share this Question
Share on Google+
3 Replies


ADezii
Expert 5K+
P: 8,692
You can access the Description Property of a QueryDef Object in the following manner:
Expand|Select|Wrap|Line Numbers
  1. CurrentDb.QueryDefs("<Your Query Name>").Properties("Description").Value
Jun 23 '08 #2

GuinessFan
P: 2
That worked; thanks. Don't know why I was looping through all for the DAO.Property items for each querydef and the 'Description" wouldn't show up.
Jun 25 '08 #3

ADezii
Expert 5K+
P: 8,692
That worked; thanks. Don't know why I was looping through all for the DAO.Property items for each querydef and the 'Description" wouldn't show up.
If you iterate through the Properties of a QueryDef Object, it will appear as illustrated in the code below, which lists the Properties of the Invoices Query of the Northwind Sample Database:
Expand|Select|Wrap|Line Numbers
  1. Dim qdf As DAO.QueryDef
  2. Dim prp As DAO.Property
  3. Dim intCounter As Integer
  4.  
  5. Set qdf = CurrentDb.QueryDefs("Invoices")
  6.  
  7. For Each prp In qdf.Properties
  8.   intCounter = intCounter + 1
  9.   Debug.Print "Query Property Number " & Format$(intCounter, "00") & _
  10.             " ==> " & prp.Name
  11. Next
  12.  
OUTPUT:
Expand|Select|Wrap|Line Numbers
  1. 'Notice Property #17
  2. Query Property Number 01 ==> Name
  3. Query Property Number 02 ==> DateCreated
  4. Query Property Number 03 ==> LastUpdated
  5. Query Property Number 04 ==> Type
  6. Query Property Number 05 ==> SQL
  7. Query Property Number 06 ==> Updatable
  8. Query Property Number 07 ==> Connect
  9. Query Property Number 08 ==> ReturnsRecords
  10. Query Property Number 09 ==> ODBCTimeout
  11. Query Property Number 10 ==> RecordsAffected
  12. Query Property Number 11 ==> MaxRecords
  13. Query Property Number 12 ==> StillExecuting
  14. Query Property Number 13 ==> CacheSize
  15. Query Property Number 14 ==> Prepare
  16. Query Property Number 15 ==> RecordLocks
  17. Query Property Number 16 ==> FilterOn
  18. Query Property Number 17 ==> Description
  19. Query Property Number 18 ==> OrderOn
  20. Query Property Number 19 ==> DatasheetGridlinesBehavior
  21. Query Property Number 20 ==> Filter
  22. Query Property Number 21 ==> OrderBy
  23. Query Property Number 22 ==> OrderByOn
  24. Query Property Number 23 ==> RecordsetType
  25. Query Property Number 24 ==> Orientation
  26. Query Property Number 25 ==> DOL
  27. Query Property Number 26 ==> GUID
Jun 26 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.