Documenter include Query Property-Description (2003)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GuinessFan
    New Member
    • Jun 2008
    • 2

    Documenter include Query Property-Description (2003)

    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.
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    You can access the Description Property of a QueryDef Object in the following manner:
    Code:
    CurrentDb.QueryDefs("<Your Query Name>").Properties("Description").Value

    Comment

    • GuinessFan
      New Member
      • Jun 2008
      • 2

      #3
      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.

      Comment

      • ADezii
        Recognized Expert Expert
        • Apr 2006
        • 8834

        #4
        Originally posted by GuinessFan
        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:
        Code:
        Dim qdf As DAO.QueryDef
        Dim prp As DAO.Property
        Dim intCounter As Integer
        
        Set qdf = CurrentDb.QueryDefs("Invoices")
        
        For Each prp In qdf.Properties
          intCounter = intCounter + 1
          Debug.Print "Query Property Number " & Format$(intCounter, "00") & _
                    " ==> " & prp.Name
        Next
        OUTPUT:
        Code:
        'Notice Property #17
        Query Property Number 01 ==> Name
        Query Property Number 02 ==> DateCreated
        Query Property Number 03 ==> LastUpdated
        Query Property Number 04 ==> Type
        Query Property Number 05 ==> SQL
        Query Property Number 06 ==> Updatable
        Query Property Number 07 ==> Connect
        Query Property Number 08 ==> ReturnsRecords
        Query Property Number 09 ==> ODBCTimeout
        Query Property Number 10 ==> RecordsAffected
        Query Property Number 11 ==> MaxRecords
        Query Property Number 12 ==> StillExecuting
        Query Property Number 13 ==> CacheSize
        Query Property Number 14 ==> Prepare
        Query Property Number 15 ==> RecordLocks
        Query Property Number 16 ==> FilterOn
        Query Property Number 17 ==> Description
        Query Property Number 18 ==> OrderOn
        Query Property Number 19 ==> DatasheetGridlinesBehavior
        Query Property Number 20 ==> Filter
        Query Property Number 21 ==> OrderBy
        Query Property Number 22 ==> OrderByOn
        Query Property Number 23 ==> RecordsetType
        Query Property Number 24 ==> Orientation
        Query Property Number 25 ==> DOL
        Query Property Number 26 ==> GUID

        Comment

        Working...