Chimp8471
Registered User.
- Local time
- Today, 21:15
- Joined
- Mar 18, 2003
- Messages
- 353
i have this database that monitors holiday entitlement, i have just been testing it through, and have noticed something very strange.
if i use the facility on the first few employee's it seems to work ok, but when i move throught the records to about number 6 or 7 i keep getting the folowing message.
Run Time Error '94'
Invalid Use Of Null
when i click on debug the following code is visible
Private Sub Holiday_End_Date_BeforeUpdate(Cancel As Integer)
If CInt(Me.txtTotal_Taken) + CInt(Me.Holidays_Duration) > CInt(Me.Parent.Entitlement) Then
MsgBox "Total Holidays Cannot Exceed Entitlement!", vbExclamation, "Holiday Entitlement Exceeded"
Cancel = True
End If
End Sub
but it is this line that is highlighted in yellow
If CInt(Me.txtTotal_Taken) + CInt(Me.Holidays_Duration) > CInt(Me.Parent.Entitlement) Then
i have attached the database for you to have a look, you will need to scroll through to employee number 6, 7, or 8ish
then click on the holiday tab
Please help
Andy
if i use the facility on the first few employee's it seems to work ok, but when i move throught the records to about number 6 or 7 i keep getting the folowing message.
Run Time Error '94'
Invalid Use Of Null
when i click on debug the following code is visible
Private Sub Holiday_End_Date_BeforeUpdate(Cancel As Integer)
If CInt(Me.txtTotal_Taken) + CInt(Me.Holidays_Duration) > CInt(Me.Parent.Entitlement) Then
MsgBox "Total Holidays Cannot Exceed Entitlement!", vbExclamation, "Holiday Entitlement Exceeded"
Cancel = True
End If
End Sub
but it is this line that is highlighted in yellow
If CInt(Me.txtTotal_Taken) + CInt(Me.Holidays_Duration) > CInt(Me.Parent.Entitlement) Then
i have attached the database for you to have a look, you will need to scroll through to employee number 6, 7, or 8ish
then click on the holiday tab
Please help
Andy