Composite Key and Input

J

JohS

Hi

I'm using a Composite Key of 3 indexes and am using 3 ComboBoxes to input.
But as I'm putting in new data into the fields I would come to the last
ComboBox and then I would have the message of that this record exist from
before (I'll have this message: "The changes you requested to the table were
not successful because they would create duplicate values in the index,
primary key, or relationship."). How could I prevent this from happing? Do I
need a VBA function to test if all these 3 input ComboBox data already
exist, and then just let them be populated, or if not add into a new record?
(Or is it any adjustment (some kind of form function) I could do inside
Access's own properties). Thanks, JohS
 
P

pietlinden

Hi

I'm using a Composite Key of 3 indexes and am using 3 ComboBoxes to input.
But as I'm putting in new data into the fields I would come to the last
ComboBox and then I would have the message of that this record exist from
before (I'll have this message: "The changes you requested to the table were
not successful because they would create duplicate values in the index,
primary key, or relationship."). How could I prevent this from happing? Do I
need a VBA function to test if all these 3 input ComboBox data already
exist, and then just let them be populated, or if not add into a new record?
(Or is it any adjustment (some kind of form function) I could do inside
Access's own properties). Thanks, JohS

One thing you could do is use the find Unmatched query wizard to
figure out which values have not been used... then you can only choose
these values. The rest would be eliminated from the combobox.
 
J

JohS

Thanks
One thing you could do is use the find Unmatched query wizard to
figure out which values have not been used... then you can only choose
these values. The rest would be eliminated from the combobox.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top