Senin, 12 Agustus 2013

RE: [MS_AccessPros] View Object Properties

 

Hi Jim

Did you do the first step?

<quote>
First, add this function in VBA:

Public Function stDesc(stQryName As String) As String
On Error Resume Next
stDesc = CurrentDb.QueryDefs(stQryName).Properties("Description")
End Function
</quote>

Note that the function must be in a standard module (not a form or class module).

You could easily modify this function to pass [Type] as a second argument, and then use Select Case to ascertain in which database collection to look for the property.

Here is a (not necessarily complete) list of [Type] values and their meanings:

-32768 Form
-32766 Macro
-32764 Report
-32761 Module
-32758 User
-32757 Database Document
-32756 Data Access Page
1 Table - Local
2 Database
3 Container
4 Table - Linked ODBC
5 Query
6 Table - Linked Access
8 SubDataSheet

Of course, you would not need to include all of these in your Select Case.

Best wishes,
Graham

From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of Jim Wagner
Sent: Tuesday, 13 August 2013 10:28 a.m.
To: MS_Access_Professionals@yahoogroups.com
Subject: Re: [MS_AccessPros] View Object Properties

John,

After a lot of research on what you said, I found this on the access blog, but I get an Undefined function 'stDesc' in expression error

http://blogs.office.com/b/microsoft-access/archive/2007/10/03/sorting-nav-pane-objects-by-description.aspx

Jim Wagner
________________________________

________________________________
From: John Viescas <JohnV@msn.com>
To: MS_Access_Professionals@yahoogroups.com
Sent: Monday, August 12, 2013 2:02 PM
Subject: RE: [MS_AccessPros] View Object Properties

Jim-

You won't find object properties in any of the system tables. To get to the
properties, you either have to walk through DAO TableDefs or QueryDefs or
open Forms and Reports in at least Design view from either Documents or the
AllForms or AllReports collections.

John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
http://www.viescas.com/
(Paris, France)

-----Original Message-----
From: MS_Access_Professionals@yahoogroups.com
[mailto:MS_Access_Professionals@yahoogroups.com] On Behalf Of luvmymelody
Sent: Monday, August 12, 2013 6:23 PM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] View Object Properties

Is there a system table that shows the Object Properties? I went through all
of the System objects and did not see any. I am rebuilding a database object
by object to delete any legacy objects. So I am writing legacy in the object
properties. But I would like to write a query based on the object properties
to get a list of the legacy objects, but I cannot find the system table with
that information in it.

Thank You

Jim Wagner

------------------------------------

Yahoo! Groups Links

[Non-text portions of this message have been removed]

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar