R
Raj Patel
I know that people have posted similar questions, but I am unable to
find a answer to this particular issue.
I have a main form. This form contains a subform called Medical
Encounters. When you double-click on the Reason field of the Medical
Encounters subform a Search dialog pops up. You can search for valids
reasons here by keyword. Running a search results in a list of results
displayed in a listbox. If the user double-clicks on one of the
results in the list box I want the Search dialog to disappear and the
data from that listbox gets automatically filled into the Reason field
of the Medical Encounters subform the the user clicked on.
I realize this can be done by explicitly setting
Forms(MAIN_FORM_NAME)!sbfMedicalEncounters.Form.ActiveControl.Value =
blah, blah...
My problem is that Medical Encounters is NOT the only subform that
requires this functionality. I want to genericize the code such that I
can "figure out" from the Search dialog which field on the calling
form is active and fill in the appropriate field there.
Thanks.
find a answer to this particular issue.
I have a main form. This form contains a subform called Medical
Encounters. When you double-click on the Reason field of the Medical
Encounters subform a Search dialog pops up. You can search for valids
reasons here by keyword. Running a search results in a list of results
displayed in a listbox. If the user double-clicks on one of the
results in the list box I want the Search dialog to disappear and the
data from that listbox gets automatically filled into the Reason field
of the Medical Encounters subform the the user clicked on.
I realize this can be done by explicitly setting
Forms(MAIN_FORM_NAME)!sbfMedicalEncounters.Form.ActiveControl.Value =
blah, blah...
My problem is that Medical Encounters is NOT the only subform that
requires this functionality. I want to genericize the code such that I
can "figure out" from the Search dialog which field on the calling
form is active and fill in the appropriate field there.
Thanks.