Hi..
I am trying not to duplicate DATES for each Counter.
If i have Counter 1, and inserted a date for example 01/01/2008 and already exists it gives me a message and if i go to Counter 2 and inserted same date 01/01/2008 for the first time it passes ok and so.....so in the table i must have same dates with different Counters..
Note : Counter is Numeric as field.
I have made this but its not working any help??? Thanks
If DCount("[Date Taken Leave]", "Leave ", "[Date Taken Leave]= #" & Format([Date Taken Leave], "dd/mm/yyyy") & "#") And "[Counter]='" & Me.[Counter Leave] & "'" > 0 Then
MsgBox "Already exists " & Me.[Date Taken Leave], , "! ! ! ! ! "
Cancel = True
Me.Undo
End If
I am trying not to duplicate DATES for each Counter.
If i have Counter 1, and inserted a date for example 01/01/2008 and already exists it gives me a message and if i go to Counter 2 and inserted same date 01/01/2008 for the first time it passes ok and so.....so in the table i must have same dates with different Counters..
Note : Counter is Numeric as field.
I have made this but its not working any help??? Thanks
If DCount("[Date Taken Leave]", "Leave ", "[Date Taken Leave]= #" & Format([Date Taken Leave], "dd/mm/yyyy") & "#") And "[Counter]='" & Me.[Counter Leave] & "'" > 0 Then
MsgBox "Already exists " & Me.[Date Taken Leave], , "! ! ! ! ! "
Cancel = True
Me.Undo
End If