A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Removing a field



 
 
Thread Tools Display Modes
  #1  
Old July 11th, 2008, 01:36 PM posted to microsoft.public.access.tablesdbdesign
C Tate
external usenet poster
 
Posts: 45
Default Removing a field

I have to remove a field from one of the tables in my database. Access is
telling me 'You can't delete the field. It is part of one or more
relationships. Delete the relationships from the relationships window first.'

Now, I deleted all the relationships leading to the table whose field I wish
to delete. However, Access keeps repeating the same message.

What can I do to get rid of this field?
  #2  
Old July 11th, 2008, 03:38 PM posted to microsoft.public.access.tablesdbdesign
Allen Browne
external usenet poster
 
Posts: 11,706
Default Removing a field

Try listing the relationships programmatically, to see if there is still a
hidden one:

Public Function ShowRel()
Dim db As DAO.Database
Dim rel As DAO.Relation
Dim fld As DAO.Field

Set db = CurrentDb()
For Each rel In db.Relations
Debug.Print rel.Name, rel.Table, rel.ForeignTable,
RelationAttributes(rel.Attributes)
For Each fld In rel.Fields
Debug.Print , fld.Name, fld.ForeignName
Next
Next

Set fld = Nothing
Set rel = Nothing
Set db = Nothing
End Function

--
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.

"C Tate" wrote in message
...
I have to remove a field from one of the tables in my database. Access is
telling me 'You can't delete the field. It is part of one or more
relationships. Delete the relationships from the relationships window
first.'

Now, I deleted all the relationships leading to the table whose field I
wish
to delete. However, Access keeps repeating the same message.

What can I do to get rid of this field?


  #3  
Old July 11th, 2008, 03:44 PM posted to microsoft.public.access.tablesdbdesign
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default Removing a field

In the Relationalship window click on Show All to see if there are more.
Check your queries also.
--
KARL DEWEY
Build a little - Test a little


"C Tate" wrote:

I have to remove a field from one of the tables in my database. Access is
telling me 'You can't delete the field. It is part of one or more
relationships. Delete the relationships from the relationships window first.'

Now, I deleted all the relationships leading to the table whose field I wish
to delete. However, Access keeps repeating the same message.

What can I do to get rid of this field?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:55 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.