J
John Barnes
Have a subform which contains two dates. Have code
written to check for WorkEndDate >= WorkStartDate. Code
is assigned to OnLostFocus. If ... Then statement
executes code properly and displays a message box alerting
user that the work end date must be greater than or equal
to work start date.
My problem is that I can't figure out how to return focus
to the WorkEndDate on the subform to force the user to
change their entry. Have tried macro with GoToControl, as
well as WorkEndDate.SetFocus. Neither work, the focus
moves to the next control in the tab order.
If I put a macro button on the subform and run GoToControl
from macro, then focus sets properly.
I need to find out how to set focus back to WorkEndDate
from within code (as part of if then statement.)
Thanks!
written to check for WorkEndDate >= WorkStartDate. Code
is assigned to OnLostFocus. If ... Then statement
executes code properly and displays a message box alerting
user that the work end date must be greater than or equal
to work start date.
My problem is that I can't figure out how to return focus
to the WorkEndDate on the subform to force the user to
change their entry. Have tried macro with GoToControl, as
well as WorkEndDate.SetFocus. Neither work, the focus
moves to the next control in the tab order.
If I put a macro button on the subform and run GoToControl
from macro, then focus sets properly.
I need to find out how to set focus back to WorkEndDate
from within code (as part of if then statement.)
Thanks!