Solved

How to get a Query description from code?

Posted on 2007-11-14
2
234 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 119

Accepted Solution

by:
Rey Obrero 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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Regardless of which version on MS Access you are using, one of the harder data-entry forms to create is one where most data from previous entries needs to be appended to new records, especially when there are numerous fields and records involved.  W…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

911 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now