E
Ed from AZ
(Using Access 2007) I have two fields in one table (other than the
autonumber, that is): ItemType and ItemID. ItemType will definitely
be duplicated across the records, and it is conceivable that ItemID
may be duplicated. But the combination of ItemType and ItemID may
never be duplicated. What do I look at to set this up? I especially
want to warn the user who is entering a new ItemType and ItemID via
form that "This combination already exists."
In another table, it's going to be the combination of ItemTpe, ItemID
and WorkDate. Here, data is entered from the form into the table
using
dbs.Execute " INSERT INTO tblData " _
What can I insert into the code prior to the INSERT INTO statement
that would check the three-field combination and warn the user of a
duplicate entry?
Ed
autonumber, that is): ItemType and ItemID. ItemType will definitely
be duplicated across the records, and it is conceivable that ItemID
may be duplicated. But the combination of ItemType and ItemID may
never be duplicated. What do I look at to set this up? I especially
want to warn the user who is entering a new ItemType and ItemID via
form that "This combination already exists."
In another table, it's going to be the combination of ItemTpe, ItemID
and WorkDate. Here, data is entered from the form into the table
using
dbs.Execute " INSERT INTO tblData " _
What can I insert into the code prior to the INSERT INTO statement
that would check the three-field combination and warn the user of a
duplicate entry?
Ed