error in accessing and updating sub form variables depending on Condition in main form using a Stateless Form?

error in accessing and updating sub form variables depending on Condition in main form using a Stateless Form?

Hi,

I have created a main form called " Main_Form"  that has "FName"  field.
In the sub form  called " Sub_Form" that has "Last Name" and "Address".

Now i want to update address depending on "FName " in main form and "txt_LName" in sub form using 
a Stateless Form.

below is the code written in the "Stateless form--->Custom Button-->OnClick" action .

r  =   Main_Form  [(FName == input.FName && Sub_Form.txt_LName == input.ddl_LName)];
r.Address= input.Address;

But i am not able to update the address, it is showing an Error,
"Address field is not included in Main_Form ".

How can i access the address field and update it, which is the sub form of Main form depending on condition.

Please help me in solving this problem