Check for double field values

  • Thread starter Thread starter Harmannus
  • Start date Start date
H

Harmannus

Hallo,

I have a table with the below fields. How can i check for double field
values?

So if all the below mentioned values are the same it should pop-up a
messagebox stating "Identical Field values already accist. Please change
current values"

Table:
tblSchedule

Fields:
ScheduleID
ScheduleDate
ScheduleEmployeeID
ScheduleCustomerID

So if Date, EmployeeID en CustomerID are the same/already accist it should
trigger a warning.

Thanx for any tips.

Regards,
Harmannus
 
You need to make ScheduleDate, ScheduleEmployeeID and
ScheduleCustomerID the primary key for tblSchedule. A
duplication of all three will trigger a warning that
duplicate records exist in the table with those values.
 
Hallo,

Thanx for the response!

I do not understand. There can only be 1 primary key in a table (to my
knowledge). How do i make those 3 fields the primary key as they are all in
the same table?


Regards,
Harmannus
 
Back
Top