The program bellow is designed to go from record to record incressing the number in the Cyc Field by one. What is Happening is that it is incressing the same record by one so that the end result is the number of records I have in the query and not incrementing the cyc field from 1 to 2 or 3 to 4
Private Sub RollCyc_Click()
Dim DB As DAO.Database
Dim RS As DAO.Recordset
Set DB = CurrentDb
Set RS = DB.OpenRecordset("CPEHrs_Data-qry")
RS.MoveFirst
Do Until RS.EOF
Debug.Print Cyc; " Begin Cyc #"
Debug.Print ID_Data; " Rec #"
Cyc = Cyc + 1
Debug.Print Cyc; " End Cyc #"
RS.MoveNext
Loop
End Sub
This is a ending sample of my debug print
3086 Begin Cyc #
48 Rec #
3087 End Cyc #
3087 Begin Cyc #
48 Rec #
It is working but not advancing to the next record.
Thank you for any information and help you have to offer.
Robert M
Private Sub RollCyc_Click()
Dim DB As DAO.Database
Dim RS As DAO.Recordset
Set DB = CurrentDb
Set RS = DB.OpenRecordset("CPEHrs_Data-qry")
RS.MoveFirst
Do Until RS.EOF
Debug.Print Cyc; " Begin Cyc #"
Debug.Print ID_Data; " Rec #"
Cyc = Cyc + 1
Debug.Print Cyc; " End Cyc #"
RS.MoveNext
Loop
End Sub
This is a ending sample of my debug print
3086 Begin Cyc #
48 Rec #
3087 End Cyc #
3087 Begin Cyc #
48 Rec #
It is working but not advancing to the next record.
Thank you for any information and help you have to offer.
Robert M