POSITION OF CURSOR AFTER VALIDATION ERROR

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

Guest

Greetings,

Working in OUTLOOK 2003, have a form with a text box which requires a
telephone number. In the Properties, Validation, the “Validate this field
before closing the form†box is checked, in the validation formula I have
[TELEPHONE] > 0, and a message is displayed if nothing is entered. It all
works.

My problem is that the ‘cursor’ seems to get lost, I would like to have the
cursor go to the field that is in error, any way to do that?

Thanks,

Yuda0603
 
If you want to control the cursor placement, then you'll probably want to do your validation with VBScript code in the form's Item_Send or Item_Write event handler. You can check the value and use the SetFocus method to put the focus on the desired control. See http://www.outlookcode.com/d/propsyntax.htm#unbound if you need help with the control syntax.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
Back
Top