Hi,
When a Control encounters 'LostFocus' it triggers a macro event. The macro performs a small test and displays a Error message, if so needed.
I want to go to next control if data is ok (which works) or I want to return to control where incorrect data was entered (LastName in example). Problem seems to be that it will not return to that control unless I force it to go to another control first. Can anyone explain. Thank you for any assistance...jnh
Macro:
Macroname: Condition: Action: Arguments:
test1 Len([LastName])<10 MsgBox Error msg details
... gotoControl [Lastname]
... cancelEvent
Above goes to next control in Form. Note that if I change [LastName] to
any other control in Form it will go there without any problem.
I have changed macro as follows (BUT there must be a better way):
Macroname: Condition: Action: Arguments:
test1 Len([LastName])<10 MsgBox Error msg details
... gotoControl [Firstname]
... gotoControl [Lastname]
... cancelEvent
Seem to be unable to include proper spacing in examples above.
One more: Is the cancelEvent needed/required ?
When a Control encounters 'LostFocus' it triggers a macro event. The macro performs a small test and displays a Error message, if so needed.
I want to go to next control if data is ok (which works) or I want to return to control where incorrect data was entered (LastName in example). Problem seems to be that it will not return to that control unless I force it to go to another control first. Can anyone explain. Thank you for any assistance...jnh
Macro:
Macroname: Condition: Action: Arguments:
test1 Len([LastName])<10 MsgBox Error msg details
... gotoControl [Lastname]
... cancelEvent
Above goes to next control in Form. Note that if I change [LastName] to
any other control in Form it will go there without any problem.
I have changed macro as follows (BUT there must be a better way):
Macroname: Condition: Action: Arguments:
test1 Len([LastName])<10 MsgBox Error msg details
... gotoControl [Firstname]
... gotoControl [Lastname]
... cancelEvent
Seem to be unable to include proper spacing in examples above.
One more: Is the cancelEvent needed/required ?