Relationships

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
 
J

Jerry Whittle

Are you using lookup tables at table level?

Any forms or reports with subforms or subreports?
 
A

Alex Hammerstein

Hi

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

A
 
A

Alex Hammerstein

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

A
 
K

KARL DEWEY

Do you have any queries that join that table and field combination with
another?
 
J

John W. Vinson

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
 
A

Alex Hammerstein

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
 

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

Top