Solved

Ms Access Query Question

Posted on 2014-01-14
2
273 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 34

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Familiarize people with the process of utilizing SQL Server views 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 Microsoft Access…

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

16 Experts available now in Live!

Get 1:1 Help Now