Filtering

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?
 
V

visdev1

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
 
M

Mary Fetsch

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top