Solved

Ms Access Query Question

Posted on 2014-01-14
2
279 Views
Last Modified: 2014-01-16
I have a home business that I run by myself and use Microsoft Access to manage my customers, inventory, shipments, vendors etc. The database is constantly evolving with my business and has accumulated many tables, forms, reports, etc. over the past 15 years. To better manage my database I created a query with the following SQL.

SELECT * FROM MSysObjects WHERE Flags=0

This query gives me a list of all the objects so I can review them. I would like to add one additional field called the Description field so that I can make notes to remind me what each of these objects does. I think that I need to add a separate table with the description field and perhaps one other field used to link the two tables together. What is the best way to link the tables and create a safeguard so that I cannot accidentally modify any of the data in the system's table but still be able to update the description field in my description table. (I'm aware that I can view the properties of objects and add comments but a table view will make it much easier). I'm using Access 2010.
0
Comment
Question by:EclecticBob
2 Comments
 
LVL 36

Accepted Solution

by:
PatHartman earned 500 total points
ID: 39780818
Since you can't update the system table, you won't be able to update anything in a query that joins the system table to another table.

Access does provide a Description field but it doesn't show it in the MSysObjects table.  It also only shows it in the nav pane if you use the show Details option.

You can "see" the Description field if you use the tables collection to view the data.  This will require some code which I don't have handy.  If you do a google search for Access database container, you should get a sample replacement for the nav pain (sic) that looks like the database container from earlier versions of Access.  This link should get you started - http://www.accessjunkie.com/Pages/faq_13.aspx .  It doesn't include the Description so you would need to modify it.  Then you have the task of making the form update the description.

A less code intensive solution would be to create your own version of MSysObjects that includes the Description field.  Define a primary key for this table that will eliminate duplicates.  If you always use prefixes for objects, then the object name would work.  Otherwise, you'll need at least two columns.

Then periodically, run an append query that appends new objects to your personal table.  Duplicates will be ignored so don't worry about trying to filter out what you already have.  The downside to this is it will get out of sync if you change the names of objects.  The upside, you can do it with just the append query and a form and no code.
0
 

Author Closing Comment

by:EclecticBob
ID: 39785990
Thank you, I took your suggestion and created a separate table of MSysObjects which I will periodically update. Seems like the best solution.
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on. …
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Familiarize people with the process of utilizing SQL Server stored procedures 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 Micr…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

726 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