Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Ms Access Query Question

Posted on 2014-01-14
2
Medium Priority
?
287 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 39

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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

719 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