PC Review
Forums
Newsgroups
Microsoft Access
Microsoft Access VBA Modules
Composite Key and Input
Forums
Newsgroups
Microsoft Access
Microsoft Access VBA Modules
Composite Key and Input
![]() |
Composite Key and Input |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
On Aug 2, 12:11 pm, "JohS" <solimpn...@webmail.no> wrote:
> 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. |
|
|
|
#3 |
|
Guest
Posts: n/a
|
Thanks
<pietlinden@hotmail.com> wrote in message news:1186090273.548490.57130@d30g2000prg.googlegroups.com... > On Aug 2, 12:11 pm, "JohS" <solimpn...@webmail.no> wrote: >> 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. > |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

