Sorry, I misunderstood. What I posted doesn't do this.
Your expression that you showed is generally in the right direction. From
it, it appears that you're trying to write the value from the "second"
form
(frm_Scenario_BasicData) to a subform within a subform on the first form
(frm_PPL). Thus, most likely the problem you're having is the correct
names
to use for the subform references. In ACCESS, you must use the name of
the
subform control (the control that holds the subform), which may or may
not
be the same name as the actual source object (the actual form) that is
serving as the subform.
You can check the Name property of the subform controls in the Properties
window. Here is the general syntax to reference a control on a subform in
a
subform in a form:
Forms!NameOfMainForm!NameOfSubformControl!NameOfSubformSubformControl!NameOfControlOnSubformSubform
--
Ken Snell
<MS ACCESS MVP>
message
Thanks a lot for helping me.
I do not know if don't understand, but what I need is to pass a value
from
the second form to the first one.
My first form is frm_BasicData_BasicData, which is opened from frm_PPL
with
an Opensource inside an frm_Control. Then from frm_BasicData_BasicData
i
call
frm_Scenario_BasicData.
From this last form, I want to pass a value to the
frm_BasicData_BasicData
which is in frm_PPL.
Thanks a lot, Lina
:
Pass the value in the OpenArgs argument, and then write it to the
correct
control in the second form:
In the first form:
DoCmd.OpenForm "frm_Scenarios_BasicData", acDialog, , , acFormEdit,
,Me.Id
In the second form's Load event:
If Len(Me.OpenArgs & "") > 0 Then _
Forms![frm_PPL]![frm_Control]![frm_BasicData_BasicData].Form![txt_Scenario]
= Me.OpenArgs
--
Ken Snell
<MS ACCESS MVP>
message
I have a form that calls another form with this:
DoCmd.OpenForm "frm_Scenarios_BasicData", acDialog, , , acFormEdit
So when I have frm_Scenario, i need to be able to doble clik on a
row
which
value should be sent to the first form.
I have tried this with no result:
Forms![frm_PPL]![frm_Control]![frm_BasicData_BasicData].Form![txt_Scenario]
= Me.Id
Please HELP!!