Have not worked with Access for a long while, and therefore any knowledge I previously had has now completely dissapeared (hopefully only temporarily, though). One of my colleagues has come accross a problem whilst using the database we have here.
The text highlighted in blue was the text highlighted in the VBE when the error occured.
Any ideas as to what my colleague has done to recieve this error message, and how to overcome it/prevent it from happening again?
Many thanks for your help, it is greatly appreciated
Alex
' MsgBox "Recordset EOF: " & recordSet.EOF, vbOKOnly, "Recordset"
While Not recordSet.EOF
Dim recVatrate As Double
Dim recStart As String
Dim recEnd As String
recVatrate = CDbl(recordSet(1))
recStart = recordSet(2)
Dim dateDifForStart As Integer
Dim dateDifForEnd As Integer
dateDifForStart = DateDiff("d", CDate(recStart), recordDate)
If IsNull(recordSet(3)) Then
dateDifForEnd = -2
Else
recEnd = recordSet(3)
dateDifForEnd = DateDiff("d", CDate(recEnd), recordDate)
End If
If dateDifForStart >= 0 And dateDifForEnd <= 0 Then
If Not IsNull(costExVat) Then
If typeVatable Then
If Not LostReciept Then
If costExVat Then
calculateVat = staffCost * recVatrate
Else
calculateVat = staffCost - (staffCost / (recVatrate + 1))
End If
The text highlighted in blue was the text highlighted in the VBE when the error occured.
Any ideas as to what my colleague has done to recieve this error message, and how to overcome it/prevent it from happening again?
Many thanks for your help, it is greatly appreciated

Alex
' MsgBox "Recordset EOF: " & recordSet.EOF, vbOKOnly, "Recordset"
While Not recordSet.EOF
Dim recVatrate As Double
Dim recStart As String
Dim recEnd As String
recVatrate = CDbl(recordSet(1))
recStart = recordSet(2)
Dim dateDifForStart As Integer
Dim dateDifForEnd As Integer
dateDifForStart = DateDiff("d", CDate(recStart), recordDate)
If IsNull(recordSet(3)) Then
dateDifForEnd = -2
Else
recEnd = recordSet(3)
dateDifForEnd = DateDiff("d", CDate(recEnd), recordDate)
End If
If dateDifForStart >= 0 And dateDifForEnd <= 0 Then
If Not IsNull(costExVat) Then
If typeVatable Then
If Not LostReciept Then
If costExVat Then
calculateVat = staffCost * recVatrate
Else
calculateVat = staffCost - (staffCost / (recVatrate + 1))
End If