Setting focus on a control after error in input

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

Guest

I have a for with a date field.
in the after update
If the date entered does not meet certain criteria i set it to null.
This works fine
When I add the code
me.mydate.setfocus nothing happens. The cursor goes to the next control

I want the cursor to go back to the errored control
 
Your date verification should be in the BeforeUpdate event of the date
control and then just set Cancel = True to cancel the update and hold the
focus in the same control.
 

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

Back
Top