Consider this code please:
Private Sub Command17_Click()
Dim Db As DAO.Database
Dim Rec As DAO.Recordset
Dim TotMins As Integer
Set Db = CurrentDb()
Set Rec = Db.OpenRecordset("Tbl_PlayerMatch", dbOpenDynaset)
Do Until Rec.EOF
TotMins = TotMins + Rec!MinutesPlayed
Rec.MoveNext
Loop
Rec.Close
End Sub
Why is it that
1) <out of context> is displayed when I debug on Rec!MinutesPlayed.
2) Seems to read past EOF. Displays <out of context> for TotMins and
Rec!MinutesPlayed after last rec processed. Can't not get Totmins
displayed because of this
Many thanks
Geoff