I have two separate continuous forms. When the end user opens the form it may have 20 records. The form sets the focus on the first record, first field. The end user tabs through the record entering data. When the user Exits the last field in the record, it executes an On Exit Event and a While Wend runs going to the Next Record and this repeats until the user gets to the last record on the form and then it stops. This runs perfectly.
It is the exact same setup and procedure on the second form. When the end user opens the form it may have 50 records. The form sets the focus on the first record, first field. The end user tabs through the record and when the user exits the last field on the form the exact same While Wend runs.
But it does not go to the next record. Instead it jumps to the last record on the form and sets the focus on the correct field. It skips all the records in between. It should go to the next record until it gets to the end. I don't see anything wrong. Here is my code for both While Wends.
Code:
Private Sub UnitNO_Exit(Cancel As Integer)
While Me.CurrentRecord < Me.recordset.RecordCount
DoCmd.GoToRecord record:=acNext
Me.kPIN7.SetFocus
Wend
End Sub
Private Sub Memo_Exit(Cancel As Integer)
While Me.CurrentRecord < Me.recordset.RecordCount
DoCmd.GoToRecord record:=acNext
Me.AOPropAVLand.SetFocus
Wend
End Sub
Thanks, Phred