Form Current - iif [Ignore]=Yes DoCmd.GoToRecord , , acNext

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to write code that will skip any record that displays 'Yes' in the
[Ignore] field. Since this field may change throughout the day, and my
employees are in the system nonstop, I cannot make it a filter.

This is what I came up with, but it didn't work: Form Current:
iif [Ignore]=Yes DoCmd.GoToRecord , , acNext

It doesn't work, but is there something that will?
 
mfG --> stefan <-- Solved my problem, this is the result:

Create an event procedure:

Private Sub Form_Current

On Local Error Resume Next

If Me![Ignore] = "Yes" Then
DoCmd.GoToRecord , , acNext
End If

End Sub
 
Back
Top