Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Not Able to Edit a Form

Status
Not open for further replies.

jojigirl

MIS
Apr 24, 2006
11
0
0
US
I created a form based on two tables, Contacts and Colleges. I want to add contacts to contacts table using all the fields in the form and included only one field from the college, college name.

I have the College ID number in the contact table to link the two.

I get an error message upon entering data that says: The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationships. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate enteries.

I am thinking the duplicate thing is based on the combo box I created for the college name. I wanted it to fill in, but in creating it I brought over the field so if I choose it does that cause it to want to populate it in the college table??

All I want is to show the college name in a form where I will be entering new contacts.

The whole index thing is confusing too. Upon checking the various indexes for each table, the dialog box doesn't always match the field properties below.

Well, thanks in advance for any insight.



 
Basically to do that you create a querry where you have all the contacts table fields, and only the college name field.... you should have a College Id number next to every college, and you must make sure that no college id number is repeated, you make it primary key, and you set the college idnumber as foreign key in your contacts table, make sure duplicates are allowed, then when you are able to apply referential integrety should be many to one from contacts to college, your form will work...

The kind of error you get means that you do have duplicates in your table, meaning that you did not apply referentiel integrety......
 
I tried basing it on a query and then I can't see the college field for the other data already in the query.

Ref integrity is enforced. I've broken the relation and re-established a number of times, playing with the direction using a junction table.

Even re-reading the reference papers that are posted on this site doesn't tell me how to structure forms and queries, just help with the structure of the tables.

I'm a bit over the edge here, but the project is due on Thursday.

I've thought about starting over - creating make tables from queries and then reassign primaries and relations.

Can anyone confirm the creation of the combo box to fill in the college name? If I do a query to bring over college id from the contacts table and college name from the college table - does the lookup have to be in the table, or do I create the combo box in the form only? And do I store the data in the query or choose the save only option (using the wizard)? If I create the combo box I have to delete the original field brought over and have the wizare re-assign it.

Am I making myself clear?
 
I am sorry, I would help you.... but you mentioned in your post that it is for a project, and from what I saw when subscribing it is forbidden to help students... you will have to figure this one on your own, unless PHV,Remou or any regular user agrees on helping.
 
Well shucks. It is a project for an intro class, but I'm adopting a work project so it's much more complicated.
 
Have a look at the Northwind sample database you should have installed with access.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top