G
Guest
Hi,
tblEnrollment has the following 3 fields:
EntrantID
Date
SessionID
Before my application can insert a record in this table, it has to be sure
that the same combination of EntrantID, Date and sessionID does not already
exist in the table. I realize that I could use a composite primary key of
the 3 fields to prohibit the duplicate record from being inserted, but I just
want to provide a warning message, whereby a user could cancel the insert or
accept it.
The data values will be selected in a subform. I'm thinking that I would
need code at the subform level to validate when the insert is attempted.
Any idea how the code should be written?
Thanks,
Jody
tblEnrollment has the following 3 fields:
EntrantID
Date
SessionID
Before my application can insert a record in this table, it has to be sure
that the same combination of EntrantID, Date and sessionID does not already
exist in the table. I realize that I could use a composite primary key of
the 3 fields to prohibit the duplicate record from being inserted, but I just
want to provide a warning message, whereby a user could cancel the insert or
accept it.
The data values will be selected in a subform. I'm thinking that I would
need code at the subform level to validate when the insert is attempted.
Any idea how the code should be written?
Thanks,
Jody