K
KateB
I created a DB a while ago to record people who did not attend training. As
there are new courses, staff groups, bases, training rooms etc that can be
added at any time, I added a requery sub command so that as soon as they are
added to the respective table they can be seen in the Form. My code is:
Private Sub Form_AfterUpdate()
Me!CourseList.Requery
Next
Me.StaffGroup.Requery
Next
Me.Base.Requery
Next
Me.TrainerID.Requery
Next
Me.LocationID.Requery
End Sub
However, I have just been told that it stops the DB working and gives the
error "Next without For". I don't know how to solve this! Can anyone help?
It was OK when I tested it but is now causing problems so needs solving!
Kate
there are new courses, staff groups, bases, training rooms etc that can be
added at any time, I added a requery sub command so that as soon as they are
added to the respective table they can be seen in the Form. My code is:
Private Sub Form_AfterUpdate()
Me!CourseList.Requery
Next
Me.StaffGroup.Requery
Next
Me.Base.Requery
Next
Me.TrainerID.Requery
Next
Me.LocationID.Requery
End Sub
However, I have just been told that it stops the DB working and gives the
error "Next without For". I don't know how to solve this! Can anyone help?
It was OK when I tested it but is now causing problems so needs solving!
Kate