Relationships

  • Thread starter Thread starter Alex Hammerstein
  • Start date Start date
A

Alex Hammerstein

Hi

I am trying to change the field type in a table, from text to Number, and I
am getting an error message saying that I need to delete relationships
first. When I look at the relationship window, and scroll
left/right/up/down, there are no tables in the window. I have selected Show
All and one table is displayed.

However if I select Database documenter > relationships, it is showing that
there is a relationship

Can someone tell me what's happening?

Tks
 
Are you using lookup tables at table level?

Any forms or reports with subforms or subreports?
 
Hi

No I have checked all fields and no lookup tables. All of the forms have
been deleted - there are no other objects

A
 
I have just copied the table without data, and the new table works Ok, so I
guess there is data corruption

A
 
Hi

I am trying to change the field type in a table, from text to Number, and I
am getting an error message saying that I need to delete relationships
first. When I look at the relationship window, and scroll
left/right/up/down, there are no tables in the window. I have selected Show
All and one table is displayed.

However if I select Database documenter > relationships, it is showing that
there is a relationship

Can someone tell me what's happening?

Tks

It sounds like you've resolved it, but just in case you or someone else runs
into this, here's a little function that might help:

Sub ShowAllRelations()
Dim db As DAO.Database
Dim rel As Relation
Dim fld As Field
Set db = CurrentDb
For Each rel In db.Relations
Debug.Print "Relation "; rel.Name, rel.Table, rel.ForeignTable
For Each fld In rel.Fields
Debug.Print fld.Name; " linked to "; fld.ForeignName
Next fld
Next rel
End Sub
 
Thanks John - will tuck that one away !!

A


It sounds like you've resolved it, but just in case you or someone else runs
into this, here's a little function that might help:

Sub ShowAllRelations()
Dim db As DAO.Database
Dim rel As Relation
Dim fld As Field
Set db = CurrentDb
For Each rel In db.Relations
Debug.Print "Relation "; rel.Name, rel.Table, rel.ForeignTable
For Each fld In rel.Fields
Debug.Print fld.Name; " linked to "; fld.ForeignName
Next fld
Next rel
End Sub
 
Back
Top