J
JeffSomDal
I am attempting to set focus to a field and then return focus back to the
field that initiated this process. My attempts have resulted in creating an
endless loop error. Any help is greatly appreciated.
Form design:
I have 4 fields in my main form.
Each field corresponds to a separate page in a tab control contained in a
subForm on the MainForm.
Each page of the tab control contains an image that illustrates the
corresponding MainForm field.
This layout is required due to limited screen space. Not all images can be
displayed at the same time. The desired result is to show the corresponding
image in the subForm when its MainForm field has the focus.
My failed attempt to achieve this end...(Endless loop coding):
On Enter event of Field1:
Forms![fMainForm]![child_subForm]![TabCtl_Images].Pages(0).SetFocus
Me.Field1.SetFocus
On Enter event of Field2:
Forms![fMainForm]![child_subForm]![TabCtl_Images].Pages(1).SetFocus
Me.Field2.SetFocus
etc...
field that initiated this process. My attempts have resulted in creating an
endless loop error. Any help is greatly appreciated.
Form design:
I have 4 fields in my main form.
Each field corresponds to a separate page in a tab control contained in a
subForm on the MainForm.
Each page of the tab control contains an image that illustrates the
corresponding MainForm field.
This layout is required due to limited screen space. Not all images can be
displayed at the same time. The desired result is to show the corresponding
image in the subForm when its MainForm field has the focus.
My failed attempt to achieve this end...(Endless loop coding):
On Enter event of Field1:
Forms![fMainForm]![child_subForm]![TabCtl_Images].Pages(0).SetFocus
Me.Field1.SetFocus
On Enter event of Field2:
Forms![fMainForm]![child_subForm]![TabCtl_Images].Pages(1).SetFocus
Me.Field2.SetFocus
etc...