Hi All. I have a form with a combo box used to select the criteria for a report. The drop down is linked to a table with all of the possible choices to be used for criteria.
However, when the user selects from the combo box, the program tries to add an entry to my table (from which the choice was made), essentialy creating a duplicate entry in the table.
Example: Let's say the table has a list of colors: green, red, blue, white. When the user selects the color from the drop down (combo box form to be used as query criteria), let's say they chose green, the query would run and show me all matches for "green," but then when the form closes, my table would show: green, green, red, blue, white. The choice selected becomes duplicate.
This happens every time the form is run, and duplicates become triplicates and so forth.
Any ideas as to how to prevent this from happening? I don't know VBA or SQL (yet).
Thanks.
NOTE: I tried setting my "color" variable as a Primary Key in the table, and this keeps the table from being updated, however, it gives an error every time the form is run, and that's no good either...
"The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship..." Thing is, I never meant to request any changes.