Can't find relationship...

G

Guest

I am trying to delete a field in a table and it is telling me that I must
delete the relationships to that table/field first. I understand that, but
when I open the relationships window, it doesn't show any relationships. This
has never happened to me.

Any suggestions??
Thanks!
 
G

Guest

Yes, I have click on the show all and the show direct relationships button.
It is showing no joins whatsoever.
 
J

Jeff Boyce

Any chance your table includes one/more "lookup" type fields? I believe
these set their own relationships, which you may not see in the
relationships window.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
J

John Vinson

On Wed, 10 May 2006 06:00:02 -0700, Tanya Lee <Tanya
I am trying to delete a field in a table and it is telling me that I must
delete the relationships to that table/field first. I understand that, but
when I open the relationships window, it doesn't show any relationships. This
has never happened to me.

Any suggestions??
Thanks!

Sometimes the relationships window gets messed up. One idea would be
to use this VBA routine, or an edited version of it - this one is a
small tactical nuclear device which removes ALL relationships between
ALL tables in your database:

Sub KillAllRelations()
Dim db As DAO.Database
Dim rel As Relation
Dim inti As Integer
Set db = DBEngine(0)(0)
For inti = db.Relations.Count - 1 To 0 Step -1
Set rel = db.Relations(inti)
Debug.Print "Deleting relation "; _
rel.Name, rel.Table, rel.ForeignTable
db.Relations.Delete rel.Name
Next inti
End Sub



John W. Vinson[MVP]
 
G

Guest

Yes it does, but I have about 13 tables that are similar to this one, and
this is the only one giving me a problem, so could be some kinda glitch - I
think my best bet may be to recreate that specific table from scratch before
I start entering data.
Thanks.
 
J

Jeff Boyce

Tanya

If any of your tables have "lookup" data type fields, Access will be
creating hidden indexes & relationships. Moreover, having the table display
one thing but store something else (the foreign key) means you'll have to
take extra care with forms, queries, etc. to be sure you're using the
foreign key value and not what you SEE in the table.

A scan through the tablesdbdesign newsgroup will show a strong consensus
advising against using lookup data type fields.

Best of luck on your project!

Jeff Boyce
Microsoft Office/Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Relationships 9
can't change the data type or field size 3
Can't change data type 3
DB relationships 2
Lookup field and Relationships 2
Removing a field 2
autonumber relationship 5
Relationship Help 3

Top