Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to get a Query description from code?

Posted on 2007-11-14
2
Medium Priority
?
247 Views
Last Modified: 2012-08-13
How to get a Query description from code?
0
Comment
Question by:icad01
2 Comments
 

Author Comment

by:icad01
ID: 20279808
.
0
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

The Windows Phone Theme Colours is a tight, powerful, and well balanced palette. This tiny Access application makes it a snap to select and pick a value. And it doubles as an intro to implementing WithEvents, one of Access' hidden gems.
If you’re using QODBC to update QuickBooks data from Microsoft® Access but Access is not showing the updated data, you could have set up QODBC incorrectly.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
Suggested Courses

885 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