this code works great if I set a breakpoint at the while stmt and step thru it....
It puts a value in my txtbox "txt_trainingtype and then moves to the next record and does the same.
BUT
when I let the code run without steping thru it, it won't move to the next record AND the only values that appear in the txtbox are the 1st and 3rd.
Set rs = Me.Recordset
rs.MoveFirst
Forms!frm_Training_Matrix![qry_Training_Details_Sub subform].SetFocus
Forms![frm_Training_Matrix]![qry_Training_Details_Sub subform].Form![txt_TrainingType].SetFocus
While Not rs.EOF
Forms!frm_Training_Matrix![qry_Training_Details_Sub subform]!txt_TrainingType = rs!TrainingType
Forms![frm_Training_Matrix]![qry_Training_Details_Sub subform].Form![txt_TrainingType].SetFocus
DoCmd.GoToRecord , , acNext
rs.MoveNext
Wend
It puts a value in my txtbox "txt_trainingtype and then moves to the next record and does the same.
BUT
when I let the code run without steping thru it, it won't move to the next record AND the only values that appear in the txtbox are the 1st and 3rd.
Set rs = Me.Recordset
rs.MoveFirst
Forms!frm_Training_Matrix![qry_Training_Details_Sub subform].SetFocus
Forms![frm_Training_Matrix]![qry_Training_Details_Sub subform].Form![txt_TrainingType].SetFocus
While Not rs.EOF
Forms!frm_Training_Matrix![qry_Training_Details_Sub subform]!txt_TrainingType = rs!TrainingType
Forms![frm_Training_Matrix]![qry_Training_Details_Sub subform].Form![txt_TrainingType].SetFocus
DoCmd.GoToRecord , , acNext
rs.MoveNext
Wend