I have an append query:
That puts 5 winners into tblWIN with a WinTyp = WALK each month. (and other queries that put 5 winners in each with different WinTyp)
I'd like to fool-proof the table so that a user can not accidently put 5 additional winners with the same WinTyp for the same month/year that is already in the tblWin.
Is there a way to do this - so if someone accidently runs the query twice in the same month, they can get an error message saying that the winners have already been chosen?
Thanks for any help!
Code:
INSERT INTO tblWIN ( PID, WinD, WinTyp )
SELECT TOP 5 qfltWALKParticipants.PID, Forms!fdlgWALKWinners!txtStart AS WinDate, "WALK" AS WinTyp
FROM qfltWALKParticipants
ORDER BY Rnd([PID]);
That puts 5 winners into tblWIN with a WinTyp = WALK each month. (and other queries that put 5 winners in each with different WinTyp)
I'd like to fool-proof the table so that a user can not accidently put 5 additional winners with the same WinTyp for the same month/year that is already in the tblWin.
Is there a way to do this - so if someone accidently runs the query twice in the same month, they can get an error message saying that the winners have already been chosen?
Thanks for any help!