Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Ms Access Query Question

Posted on 2014-01-14
2
Medium Priority
?
289 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 40

Accepted Solution

by:
PatHartman earned 2000 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

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

824 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