Duplicate Message Date with Counter Help

sysop470

Registered User.
Local time
Today, 05:38
Joined
Mar 25, 2005
Messages
87
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
 
The second criteria is completely outside the DCount function. If there's actually a space in the table name, you'll have to bracket it.
 
The second criteria is completely outside the DCount function. If there's actually a space in the table name, you'll have to bracket it.


Thanks for your help!! How can i get the second criteria with the same DCOUNT Function or other solution . Its my mistake regarding the space in the table name.

Thanks Again
 
I can't manage to work....I think its a bit difficult for me, cause i am newbie
Any help or idea please??
 
Post your latest effort and we'll sort it out.
 

Users who are viewing this thread

Back
Top Bottom