A
ARN
I've a table which has the following fields
Date
Emp_ID
MediCal_allowance
Ticket-Fare
House_Allowace
Daily_Allowance
I've the form having the above mentioned fields
What I'm looking for is the following
I want to avoid duplication that means, in a year , an
employee entitled for the medical,ticket and
House_Allowace is once . if the user try to enter the
above allowance again in the same year the program
should
give a message that the employee has already been paid,
and duplication should not allow, on the other had the
system should allow the user to enter the daily
allowance
for same employee( that means no restrictions in daily
allowance)
someone gave me the following method
====================================
If Not IsNull(DCount("*", "table", "Emp_ID=" & Me.txtEmpID _
& " And Year([Date])=" & Year(Me.txtDate) _
& " And House_Allowance Is Not Null") Then
MsgBox "Duplicate House Allowance"
Cancel = True
I've used this method, but now it is not allowing me any
record to add. as soon I finish entering it doesnot allow
me to save. I need the system to allow once, only the
duplication to be avoided. Please help
ARN
Date
Emp_ID
MediCal_allowance
Ticket-Fare
House_Allowace
Daily_Allowance
I've the form having the above mentioned fields
What I'm looking for is the following
I want to avoid duplication that means, in a year , an
employee entitled for the medical,ticket and
House_Allowace is once . if the user try to enter the
above allowance again in the same year the program
should
give a message that the employee has already been paid,
and duplication should not allow, on the other had the
system should allow the user to enter the daily
allowance
for same employee( that means no restrictions in daily
allowance)
someone gave me the following method
====================================
If Not IsNull(DCount("*", "table", "Emp_ID=" & Me.txtEmpID _
& " And Year([Date])=" & Year(Me.txtDate) _
& " And House_Allowance Is Not Null") Then
MsgBox "Duplicate House Allowance"
Cancel = True
I've used this method, but now it is not allowing me any
record to add. as soon I finish entering it doesnot allow
me to save. I need the system to allow once, only the
duplication to be avoided. Please help
ARN