Solved

How to get a Query description from code?

Posted on 2007-11-14
2
239 Views
Last Modified: 2012-08-13
How to get a Query description from code?
0
Comment
Question by:icad01
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:icad01
ID: 20279808
.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 500 total points
ID: 20279834
try this function

Function GetQryDefDesc(ByVal sQryDef As String) As String
   Dim db   As Object
   Dim Qdef As Object

   Set db = CurrentDb
   On Error Resume Next
   Set Qdef = db.QueryDefs(sQryDef)
   If Err Then
      MsgBox "Could not access " & sQryDef
      Exit Function
   End If

   GetQryDefDesc = Qdef.Properties("Description")
   If Err Then
      GetQryDefDesc = ""
   End If
   On Error GoTo 0
   Set Qdef = Nothing
   Set db = Nothing
End Function
0

Featured Post

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question