Thanks Steve for your help.
>I would add a where clause to your statement. Do you care about shifts in the past? If not, where (Djh) >= date()-15.
Yes I do.
>Include a new index on the date so it will be optimized and you should get much better results.
I already have a tag on dHorDjh
>The other issue is why or how are the allowed to dupe in the first place? You may find that re-examining your valid on your data entry screen is in order?
That's what I want to find without checking the code. Because I test the application on 1 pc with 2 sessions and I cannot reproduce the dupes. I want my apps to tell me where the dupes come from. he! he! ;)
>My guess is that they pick the employee from a pick list of some sort and then add the date? So vaild on the date should say that emp is already entered for this day?
It's more complicated than that and I don't know where the problems comes from. So like I said I need clues to find where they appear.
François Dagenais
LAGIBERT Informatique