set focus on textfied

jksjks Member Posts: 277
Hi all,

Can't i set focus to a particular textfield on a form in OnDeactivate() trigger of the same field?

e.g textfield is DataPath. If path is incorrect i want to set focus to the same field.
DataPath: OnDeactivate()
{
if path is incorrect then
currform.DataPath.activate;
}
Above code doesn't set focus on DataPath field.
Please help.

Comments

  • kinekine Member Posts: 12,562
    And why you don't use Error?

    If you want to do it without message, you can use Error('');
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • jksjks Member Posts: 277
    Thanks Kine.
    You have provided a great help.
Sign In or Register to comment.