I think my database is corrupted

This is a standard option for cleaning corrupt databases - you can lose the relationship diagrams but that is it.


I've been using a database that I copied and I just opened the relationship diagram and found that my previous relationships were gone, replaced by three tables:

MSysNavPaneGroupCategories
MSysNavPaneGroupToCategories
MSysNavPaneGroups

Where did these alien tables come from and how have my previous relationships been affected? What happens if I change the relationships for these tables?

Can I remove them from the Relationships window and just add the relationships for my tables?

But how can all my forms still be working if there were no relationships between my tables? Does it save the relationships somewhere else?
 
I've been using a database that I copied and I just opened the relationship diagram and found that my previous relationships were gone, replaced by three tables:

MSysNavPaneGroupCategories
MSysNavPaneGroupToCategories
MSysNavPaneGroups

Where did these alien tables come from and how have my previous relationships been affected? What happens if I change the relationships for these tables?

Can I remove them from the Relationships window and just add the relationships for my tables?

But how can all my forms still be working if there were no relationships between my tables? Does it save the relationships somewhere else?

They are all system tables that are normally hidden.
There are several others as well e.g. MSysObjects and are vital to your database running properly
System tables shouldn't normally be edited or definitely not deleted.
Nor should you change the relationships between them

However, you can (& I suggest you do) remove them from the relationships window.

As for your relationships, they will be imported IF you tick the option checkbox shown below
I normally tick them all ....

attachment.php


If you DID tick them, the relationships will exist, but may not be visible in the relationships window.

There are 2 ways of checking that:
1. Drag some of the tables that should be related & see whether the links are shown.
2. Look at the hidden/system MSysRelationships table but DON'T try to edit it!
 

Attachments

  • Capture.PNG
    Capture.PNG
    14.8 KB · Views: 318
Last edited:
I never saw those checkboxes. I simply copied and pasted the objects. I thought that's what we were talking about.

I guess I'll have to redo the relationships....although I wonder why in my recordsource queries it still has the relationships and they still function correctly.

I've been getting weird errors lately, with dialog boxes popping up when I open my main form asking to enter data controls as if they can't be found, and when I click cancel Access crashes and says it's recovering data and restarts. Copying the database file and opening the copy makes the error go away, which is very weird. All this done from a local hard drive.
 
I never saw those checkboxes. I simply copied and pasted the objects. I thought that's what we were talking about.

I guess I'll have to redo the relationships....although I wonder why in my recordsource queries it still has the relationships and they still function correctly.

I've been getting weird errors lately, with dialog boxes popping up when I open my main form asking to enter data controls as if they can't be found, and when I click cancel Access crashes and says it's recovering data and restarts. Copying the database file and opening the copy makes the error go away, which is very weird. All this done from a local hard drive.

If the relationships exist, they will be added automatically in the query designer
Some people say there is little point adding relationships globally & just add them when creating queries or record sources.
Others disagree

If 'weird crashes' occur occasionally, decompiling then recompiling will usually fix them without resorting to creating a 'clean' db
If they occur regularly you should look at causes within your db
If they occur on more than 1 db regularly, then I would reinstall Access
 
decompiling and recompiling must be done from the command line?

btw, I just Compressed & Repaired my database and it went from 93.5 megabytes to 1.9 megabytes :eek: all in a split second.
 
....although I wonder why in my recordsource queries it still has the relationships and they still function correctly.
Relationships between tables is not the same as joins between tables - they a) just happen to be presented the same way in a gui and b) most, but by no means all, joins will be between the same fields.

To test this, in the relationships window, right click on a relationship and select properties - they are different to those you get if you right click on a join in a query - although there are some the same.

relationships define the rules by which the various tables relate to each other. Joins are used to define the data you want returned
 
What does a relationship with an infinity symbol on both ends do for me in the relationships window? I have Orders and ConstructionSite tables, both of which have CustomerID foreign keys. I drew a line and it is like that, and it won't let me enable Enforce Referential Integrity.
 
you normally have a 1 at one end (the parent) and the infinity sign at the other (the child). They represent a 1 to many relationship and are defined in the relationships window when you select 'enforce referential integrity'

When integrity is enforced, you cannot create a child record without a pre existing parent and you cannot delete a parent if it has children.
 
Yeah that's why I'm asking what is the use of a line with infinity sign on both ends.

Anyway, after doing some searching, I found out that I could fix my original corrupted database by redefining the record source of the offending table, i.e. cut out the fields, delete the tables, close and save, reopen, reselect the tables, and paste back the fields. Also it appears my problem only happens in non-English language versions of Access.

Between this and recompiling, I think I have all the tools needed to survive another corruption. :)
 

Users who are viewing this thread

Back
Top Bottom