P
PeterM
I have a form in AC2003. FormA calls FormB with the OpenArgs set to the
control name on FormA to populate the results of FormB. My users are
selecting a time which is on FormB. Because this function is needed for
about 20 other forms, I have created a generic FormB. The openargs being
used by the OpenForm from FormA consists of a string name which represents of
the fully qualified control name back on FormA to receive the calculated
value of FormB. For example FormA calls FormB by:
DoCmd.OpenForm "FormB", , , , , acDialog,
"forms!sidemenu!formnameonly.form.PD_Med_1_Time"
This works fine. PD_Med_1_Time is the control on FormA to receive the
calculated value in FormB. I'm having problems in FormB when I try to
populate the control PD_Med_1_Time on FormA. I've tried
forms(FormAControlName)=FormBValue
and all other variations that I can think of, but it won't work. How do you
refer to a control on another form when you have the full form name and
control name as a literal value?
Actually, SideMenu contains a control for a subform "FormNameOnly" and
"FormNameOnly" has a subform control on it "FormA". THe layering differs on
different forms and is not a constant. Below is the code in FormB when it's
time to send the calculated value back to FormA.
Forms!SideMenu!FormNameOnly.Form.PD_Med_1_Time = FormBValue
where PD_Med_1_Time is the control on FormA to be populated and FormBValue
is the calculated value in FormB.
Any help would be greatly appreciated...thank you!
control name on FormA to populate the results of FormB. My users are
selecting a time which is on FormB. Because this function is needed for
about 20 other forms, I have created a generic FormB. The openargs being
used by the OpenForm from FormA consists of a string name which represents of
the fully qualified control name back on FormA to receive the calculated
value of FormB. For example FormA calls FormB by:
DoCmd.OpenForm "FormB", , , , , acDialog,
"forms!sidemenu!formnameonly.form.PD_Med_1_Time"
This works fine. PD_Med_1_Time is the control on FormA to receive the
calculated value in FormB. I'm having problems in FormB when I try to
populate the control PD_Med_1_Time on FormA. I've tried
forms(FormAControlName)=FormBValue
and all other variations that I can think of, but it won't work. How do you
refer to a control on another form when you have the full form name and
control name as a literal value?
Actually, SideMenu contains a control for a subform "FormNameOnly" and
"FormNameOnly" has a subform control on it "FormA". THe layering differs on
different forms and is not a constant. Below is the code in FormB when it's
time to send the calculated value back to FormA.
Forms!SideMenu!FormNameOnly.Form.PD_Med_1_Time = FormBValue
where PD_Med_1_Time is the control on FormA to be populated and FormBValue
is the calculated value in FormB.
Any help would be greatly appreciated...thank you!