473,385 Members | 1,341 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Phantom Relationships

Max
Hi. I really hope someone can help me. Going slowly insane with this
problem.

I have a two Access 2000 databases. One is the backend containing
tables and some admin queries. The other is the front end with forms /
queries and links to the tables in the back end.

From the Relationships window I selected File / Print Relationships.
The resulting report shows relationships that are not displayed in the
relationships window. Some of these relationships are plain wrong –
linking two tables on fields that are not actually related. I have…
clicked the "show all", "show direct" buttons
removed and added the tables in the relationship window a dozen times
created the "wrong" relationships again and deleted them
deleted all relationships
compacted and repaired a dozen times.

And still, these wrong relationships show up in the report, and no
relationships show in the relationship window.

What seems to be related is that I found I had some strange indexes in
several tables – the index name being the same as a field name, but
composed of multiple fields. I don't know where these came from but
they were the same fields as are "wrongly" linked. So, I have now
removed all indexing from all my tables.

But checking in the MSysRelationships table there are still 25 records
of defined relationships, none of which I can see in the relationships
window and some of which are duplicated.

This backend does contain some queries for updating and the like.
However, non of them involve creating a link between the tables in
question.

Has anyone got any suggestions as to what could be causing this? I
can't find anything on the KB and a couple of similar posts here
didn't come up with any answers.

Any suggestions would be much appreciated.

Thanks,
Max
Nov 13 '05 #1
2 4101
Hi Max

Whenever you create a relationship with enforced Referential Integrity,
Access creates a hidden index to manage it. The relationship will be named
after the tables/fields if the name is available; otherwise it will use a
GUID.

Additionally, Access automatically creates indexes on any fields that have a
name ending with ID, Code, Num, etc. unless you remove the entries under:
Tools | Options | Tables/Queries | AutoIndex

To add to the confusion, the Name AutoCorrect feature tries to keep track of
changes to the table names or field names. This feature creates *many*
problems, with well over a dozen known bugs listed in:
Failures caused by Name Auto-Correct
at:
http://members.iinet.net.au/~allenbrowne/bug-03.html

There may also be bugs in the relationship report, but I have not
experienced those.

Try this process to rebuild your database:

1. Delete all relationships
The code in this link will delete all the relations in your database, even
the hidden ones:
http://members.iinet.net.au/~allenbrowne/DelRel.html
Then compact the database.

2. Create a new (blank) database.

3. Uncheck the Name AutoCorrect boxes under:
Tools | Options | General.

4. Import everything from the damaged database:
File | Get External | Import

5. Create the relationships from scratch.

Finally, Stephen Lebans has a utility that reads the details of the
relationships as Access has them stored, and lets you save and restore
multiple relationship window layouts. His code may give you clues as to how
Access is storing this data if you want to investigate the problem further.
See:
http://www.lebans.com/saverelationshipview.htm

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Max" <mf*******@hotmail.com> wrote in message
news:24************************@posting.google.com ...
Hi. I really hope someone can help me. Going slowly insane with this
problem.

I have a two Access 2000 databases. One is the backend containing
tables and some admin queries. The other is the front end with forms /
queries and links to the tables in the back end.

From the Relationships window I selected File / Print Relationships.
The resulting report shows relationships that are not displayed in the
relationships window. Some of these relationships are plain wrong -
linking two tables on fields that are not actually related. I have.
clicked the "show all", "show direct" buttons
removed and added the tables in the relationship window a dozen times
created the "wrong" relationships again and deleted them
deleted all relationships
compacted and repaired a dozen times.

And still, these wrong relationships show up in the report, and no
relationships show in the relationship window.

What seems to be related is that I found I had some strange indexes in
several tables - the index name being the same as a field name, but
composed of multiple fields. I don't know where these came from but
they were the same fields as are "wrongly" linked. So, I have now
removed all indexing from all my tables.

But checking in the MSysRelationships table there are still 25 records
of defined relationships, none of which I can see in the relationships
window and some of which are duplicated.

This backend does contain some queries for updating and the like.
However, non of them involve creating a link between the tables in
question.

Has anyone got any suggestions as to what could be causing this? I
can't find anything on the KB and a couple of similar posts here
didn't come up with any answers.

Any suggestions would be much appreciated.

Thanks,
Max

Nov 13 '05 #2
Max
Fantastic! Thank you Allen

That seems to have done the trick.

I think I had incorrectly created a relationship in the past - causing
Access to create these hidden indexes. I realised my mistake and
deleted the relationship but the indexes remained and somehow casued
the relationships to persist.

Story of my life, appropriately enough.

Anyway, I think it's ok now.

Thanks again for your help.

Max

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message news:<40**********************@per-qv1-newsreader-01.iinet.net.au>...
Hi Max

Whenever you create a relationship with enforced Referential Integrity,
Access creates a hidden index to manage it. The relationship will be named
after the tables/fields if the name is available; otherwise it will use a
GUID.

Additionally, Access automatically creates indexes on any fields that have a
name ending with ID, Code, Num, etc. unless you remove the entries under:
Tools | Options | Tables/Queries | AutoIndex

To add to the confusion, the Name AutoCorrect feature tries to keep track of
changes to the table names or field names. This feature creates *many*
problems, with well over a dozen known bugs listed in:
Failures caused by Name Auto-Correct
at:
http://members.iinet.net.au/~allenbrowne/bug-03.html

There may also be bugs in the relationship report, but I have not
experienced those.

Try this process to rebuild your database:

1. Delete all relationships
The code in this link will delete all the relations in your database, even
the hidden ones:
http://members.iinet.net.au/~allenbrowne/DelRel.html
Then compact the database.

2. Create a new (blank) database.

3. Uncheck the Name AutoCorrect boxes under:
Tools | Options | General.

4. Import everything from the damaged database:
File | Get External | Import

5. Create the relationships from scratch.

Finally, Stephen Lebans has a utility that reads the details of the
relationships as Access has them stored, and lets you save and restore
multiple relationship window layouts. His code may give you clues as to how
Access is storing this data if you want to investigate the problem further.
See:
http://www.lebans.com/saverelationshipview.htm

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Max" <mf*******@hotmail.com> wrote in message
news:24************************@posting.google.com ...
Hi. I really hope someone can help me. Going slowly insane with this
problem.

I have a two Access 2000 databases. One is the backend containing
tables and some admin queries. The other is the front end with forms /
queries and links to the tables in the back end.

From the Relationships window I selected File / Print Relationships.
The resulting report shows relationships that are not displayed in the
relationships window. Some of these relationships are plain wrong -
linking two tables on fields that are not actually related. I have.
clicked the "show all", "show direct" buttons
removed and added the tables in the relationship window a dozen times
created the "wrong" relationships again and deleted them
deleted all relationships
compacted and repaired a dozen times.

And still, these wrong relationships show up in the report, and no
relationships show in the relationship window.

What seems to be related is that I found I had some strange indexes in
several tables - the index name being the same as a field name, but
composed of multiple fields. I don't know where these came from but
they were the same fields as are "wrongly" linked. So, I have now
removed all indexing from all my tables.

But checking in the MSysRelationships table there are still 25 records
of defined relationships, none of which I can see in the relationships
window and some of which are duplicated.

This backend does contain some queries for updating and the like.
However, non of them involve creating a link between the tables in
question.

Has anyone got any suggestions as to what could be causing this? I
can't find anything on the KB and a couple of similar posts here
didn't come up with any answers.

Any suggestions would be much appreciated.

Thanks,
Max

Nov 13 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Andrew | last post by:
Hi All, Have come across something weird and am after some help. Say i run this query where rec_id is a column of table arlhrl, select * from arlhrl where rec_id >= 14260 This returns to...
0
by: Megan | last post by:
Hi Everybody- I know that this is a really, really long post, but I wanted to try to give you as much background as possible. So here's a quick overview of the issues I'm asking for help with:...
7
by: davegb | last post by:
I'm totally new to relational database design. My boss has asked me to create a database of information on the employees in our group. Seemed to me like a simple application to learn the ropes. A...
3
by: memememe | last post by:
I see weak reference on the .net api, but I do not see soft or phantom, are they supported on .net?
0
by: Rod Billett | last post by:
The included html contains 3 divs. One primary Div, with 2 nested divs. the second nested DIV contains an empty table. Problem 1: Phantom Space. When viewed within the browser, the div 'action...
9
by: Dave | last post by:
Apologies if this has come up before, but I can't find it if it has. I am fairly new to .Net and am having problems with ghosts in the datagrid. Basically I have a find screen that accepts...
9
by: TB | last post by:
Hi all: I realize that this is strictly speaking not an ASP.NET question, but since most of you people out there SQL gurus as well, I hope you will bear with me on this occasion: I would like...
45
by: salad | last post by:
I'm curious about your opinion on setting relationships. When I designed my first app in Access I'd go to Tools/Relationships and set the relationships. Over time I'd go into the window and see...
13
by: ARC | last post by:
Hello all, Prior to going live with my app, I have questions on relationships theory. My prior app was done in Access 97, and I did NOT use relationships at all. I have 65 tables in my...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.