L
L Morgan
Private Sub Form_Load()
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT * FROM TimeSheet WHERE SocialSecurity
='" & SocialSecurity & "'")
rs.MoveFirst
While Not rs.EOF
T_SickVal = T_SickVal + rs.Fields(9).Value
T_HolidayVal = T_HolidayVal + rs.Fields(8).Value {the error is in
this line}
T_VacationVal = T_VacationVal + rs.Fields(7).Value
rs.MoveNext
Wend
'Release Memory
rs.Close
Set rs = Nothing
db.Close
Set db = Nothing
End Sub
Dim db As Database
Dim rs As Recordset
Set db = CurrentDb
Set rs = db.OpenRecordset("SELECT * FROM TimeSheet WHERE SocialSecurity
='" & SocialSecurity & "'")
rs.MoveFirst
While Not rs.EOF
T_SickVal = T_SickVal + rs.Fields(9).Value
T_HolidayVal = T_HolidayVal + rs.Fields(8).Value {the error is in
this line}
T_VacationVal = T_VacationVal + rs.Fields(7).Value
rs.MoveNext
Wend
'Release Memory
rs.Close
Set rs = Nothing
db.Close
Set db = Nothing
End Sub