Filtering

  • Thread starter Thread starter Mary Fetsch
  • Start date Start date
M

Mary Fetsch

In my Access 2000 project, I have 10 fields on my form. When I click the
Filter By Form button, enter something in the 5th field, and then click the
Apply Filter button, I see the results of the filtering, and the cursor is
in the first field. If I then click the Filter By Form button again, the
cursor moves to the 5th field. How can I get the cursor to move to the
first field each time I click the Filter By Form button?
 
Under the ApplyFilter event use setfocus to move the cursor to the first field.

Private Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer)
Me.FirstFieldName.SetFocus 'you can use me. or the name of the form
End Sub
 
Thanks! I'll try that.

visdev1 said:
Under the ApplyFilter event use setfocus to move the cursor to the first field.

Private Sub Form_ApplyFilter(Cancel As Integer, ApplyType As Integer)
Me.FirstFieldName.SetFocus 'you can use me. or the name of the form
End Sub
 
Back
Top