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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Combo box on main form to filter subform 1

Status
Not open for further replies.

chadrj

Technical User
Feb 24, 2003
26
US
I am trying to set up a database to allow for data entry. I want the user to select the "object" from the combo box on the main form, and tab down to the subform and enter "attributes" on the subform. Currently when I select an object from the combo box then tab down to the subform, I get the following error:

"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. (Error 3022)"

I do not want the user to change anything on the object, or create new objects, but I am afraid that is what it is trying to do. How do I get the main form to act simply as a filter to allow for entry of attributes on the subform?

btw objects to attributes is a many-to-many relationship with the appropriate linking table "object-attributes"

Thanks
 
Try making your main form unbound (i.e. no record source), and specify a SQL statement that is equivalent to the main form's record source as your combo box's row source (except that you will want to specify only the appropriate field(s) for your combo box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top