Hi
I have a simple database. an articles table, authors table, categories table, not much else.
So one article can have many categories. To manage this, I have my 'articles' table (pk autonumber ID, plus other fields), a 'categories' table (pk autonumber ID, txt description), and I created a linking table 'article categories' autonumber ID, number articles (related to article ID in article table) and number categories (related to category ID in categories table)
Then I made a form for articles, with a subform for categories (taking the category field from the categories table).
1st problem - the category field in the subform appears as a text box, not a drop down list of category descriptions. I deleted it and added manually a combo box with the category field from the categories table as control source, telling it to store the value in the field 'category' in the 'article categories' linking table. This gives me the drop down list.
2nd problem - I select one category in the subform, when I try to select a second, it tells me "The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."
I checked the fields in the 'article categories' table and they are not set to 'no duplicates'.
The strange thing seems that I can enter this ok in the table, just not the subform.
I know this problem has already been discussed here, but I could not find an answer to my case in the previous posts, so I apologise if this is repetitive.
I think this is simple but I am a novice...
I tried to attach the database to this - both normal and then zipped but it says 'invalid file' (it is only 1mb).
I would be extremely grateful for anyone's help
thank you
Eleanor
I have a simple database. an articles table, authors table, categories table, not much else.
So one article can have many categories. To manage this, I have my 'articles' table (pk autonumber ID, plus other fields), a 'categories' table (pk autonumber ID, txt description), and I created a linking table 'article categories' autonumber ID, number articles (related to article ID in article table) and number categories (related to category ID in categories table)
Then I made a form for articles, with a subform for categories (taking the category field from the categories table).
1st problem - the category field in the subform appears as a text box, not a drop down list of category descriptions. I deleted it and added manually a combo box with the category field from the categories table as control source, telling it to store the value in the field 'category' in the 'article categories' linking table. This gives me the drop down list.
2nd problem - I select one category in the subform, when I try to select a second, it tells me "The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."
I checked the fields in the 'article categories' table and they are not set to 'no duplicates'.
The strange thing seems that I can enter this ok in the table, just not the subform.
I know this problem has already been discussed here, but I could not find an answer to my case in the previous posts, so I apologise if this is repetitive.
I think this is simple but I am a novice...
I tried to attach the database to this - both normal and then zipped but it says 'invalid file' (it is only 1mb).
I would be extremely grateful for anyone's help
thank you
Eleanor