More work to follow once this is fixed. At first I was getting division by zero when calculating F1fps and F2fps. I somehow stopped that error but now the conditions are not being met for the F2fps. When d < 8 is getting the wrong results. The code for F1fps is working with no errors yet

Code:Private Function F1fps_Calc(ByRef r As clsRecord, ByVal detailRecordNum As Integer) As Variant '// get the paceline distance in furlongs Dim dist As String dist = gFieldMapping.GetFieldValue(r, "dist " & detailRecordNum) Dim dist_val As Double If IsNumeric(dist) Then dist_val = CDbl(dist) / 220 End If If dist_val < 0 Then dist_val = Abs(dist_val) End If Select Case dist_val Case Is >= 9 If gFieldMapping.GetFieldValue(r, "frac #1 " & detailRecordNum) = 0 Then F1fps_Calc = "" Else F1fps_Calc = FormatNumber(((2640 - (gFieldMapping.GetFieldValue(r, "bl1c " & detailRecordNum) * 9)) / gFieldMapping.GetFieldValue(r, "frac #1 " & detailRecordNum)), 2) End If Case Is < 9 If gFieldMapping.GetFieldValue(r, "frac #2 " & detailRecordNum) = 0 Then F1fps_Calc = "" Else F1fps_Calc = FormatNumber(((2640 - (gFieldMapping.GetFieldValue(r, "bl1c " & detailRecordNum) * 9)) / gFieldMapping.GetFieldValue(r, "frac #2 " & detailRecordNum)), 2) End If Case Is < 8 If gFieldMapping.GetFieldValue(r, "frac #1 " & detailRecordNum) = 0 Then F1fps_Calc = "" Else F1fps_Calc = FormatNumber(((1320 - (gFieldMapping.GetFieldValue(r, "bl1c " & detailRecordNum) * 9)) / gFieldMapping.GetFieldValue(r, "frac #1 " & detailRecordNum)), 2) End If End Select End Function Private Function F2fps_Calc(ByRef r As clsRecord, ByVal detailRecordNum As Integer) As Variant '// get the paceline distance in furlongs Dim dist As String dist = gFieldMapping.GetFieldValue(r, "dist " & detailRecordNum) Dim dist_val As Double If IsNumeric(dist) Then dist_val = CDbl(dist) / 220 End If If dist_val < 0 Then dist_val = Abs(dist_val) End If Select Case dist_val Case Is >= 9 If gFieldMapping.GetFieldValue(r, "frac #1 " & detailRecordNum) = 0 Then F2fps_Calc = "" Else F2fps_Calc = FormatNumber((1320 - (gFieldMapping.GetFieldValue(r, "bl2c " & detailRecordNum) - gFieldMapping.GetFieldValue(r, "bl1c " & detailRecordNum)) * 9) / (gFieldMapping.GetFieldValue(r, "frac #2 " & detailRecordNum) - gFieldMapping.GetFieldValue(r, "frac #1 " & detailRecordNum)), 2) End If Case Is < 9 If gFieldMapping.GetFieldValue(r, "frac #2 " & detailRecordNum) = 0 Then F2fps_Calc = "" Else F2fps_Calc = FormatNumber((1320 - (gFieldMapping.GetFieldValue(r, "bl2c " & detailRecordNum) - gFieldMapping.GetFieldValue(r, "bl1c " & detailRecordNum)) * 9) / (gFieldMapping.GetFieldValue(r, "frac #3 " & detailRecordNum) - gFieldMapping.GetFieldValue(r, "frac #2 " & detailRecordNum)), 2) End If Case Is < 8 If gFieldMapping.GetFieldValue(r, "frac #1 " & detailRecordNum) = 0 Then F2fps_Calc = "" Else F2fps_Calc = FormatNumber((1320 - (gFieldMapping.GetFieldValue(r, "bl2c " & detailRecordNum) - gFieldMapping.GetFieldValue(r, "bl1c " & detailRecordNum)) * 9) / (gFieldMapping.GetFieldValue(r, "frac #2 " & detailRecordNum) - gFieldMapping.GetFieldValue(r, "frac #1 " & detailRecordNum)), 2) End If End Select End Function