Sorting Nav Pane Objects by Description

I've recently had some questions from users who used to sort their DBC by the description field and wanted to be able to do the same thing in the 2007 navigation pane.  If you use this scenario, and you've tried in 2007, you'll know that the navigation pane doesn't have a sort by the description field.  One way to work around this is to create a query that does it for you. 

Here's a sample that lists the user Query objects in the database along with their descriptions.  Note because the Description property is not stored as a field in MSysObjects, you need some accompanying VBA logic to retrieve the description property from the property bag. 

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

Then run this query:

SELECT MSysObjects.Name, stDesc([Name]) AS Description
FROM MSysObjects
WHERE (((MSysObjects.Name) Not Like "~*") AND ((MSysObjects.Type)=5))
ORDER BY stDesc([Name]);

Office Blogs Comments

Comments: (5) Collapse

  • Hi Zac, So good, you can build a query to see your objects in a differant order...but then you have to say OK the one I want frmXYZ and go back to the nav pane and find it. What this really highlights for me is that the Nav Pane is a very poor substitute for the old Database window. When are you going to bring it back? When i am flipping between say Tables and Forms it is so many more mouse clicks and drags it is crazy slow. It slows me down big time. Does anyone else find this? Bruce

  • KiwiBruce,

    Yes, I agree. The Navigation Pane may be useful for people who navigate about their database using it, but for developers it is poor. It is much more difficult to move between objects as each entry takes more space and there is only one column. Alan Cossey

  • Alan,

    I have to disagree with you. I actually like the new Nav Pane. In my nav pane i have created some custom groups. I have all my objects sorted by their use. every thing is organized. I know right where to go when I am look for something. I love it!

  • KiwiBruce and Alan, have you tried searching in the NavPane by using ctrl+F? I've found this to be a huge time saver, no more hunting through big lists of objects like I had to do in the DBC. Even if they're alphabetized, it still takes a while to find 1 form out of 25.

  • Thanks Zac I will try the Find feature and see if that eases my pain. One thing in particular that really drives me absolutely nuts is once a category is collapsed, the Nav Pane does not remember the most recently used object under each category. The DBC did this why on earth would the Nave pane not? Crazy! I work with a couple of apps that have 500+ and 800+ objects and this is not easy in the Nave Pane but I could re-size the DBC and work with hundreds of objects no problem. Anyway I have found a few DBC replacements so I think they will be the best bet for developers that need to deal with large object sets.

Comments

Comments: (loading) Collapse