G
Guest
I need to know the value of a master field from a subform (a reference to the
subform is stored in frm object). I use
frm.Parent.Recordset.Fields(master_fld_name).Value
but it always returns the value of the first record. For example: the parent
form contains a combobox with values 111, 222, 333. The field linked with the
combobox is a master field for my subform (the string variable
master_fld_name contains the name of this field). If I choose 111, the above
code returns 111. When I choose 333, the code also returns 111. I can't
understand why it does not return the value for a current record.
subform is stored in frm object). I use
frm.Parent.Recordset.Fields(master_fld_name).Value
but it always returns the value of the first record. For example: the parent
form contains a combobox with values 111, 222, 333. The field linked with the
combobox is a master field for my subform (the string variable
master_fld_name contains the name of this field). If I choose 111, the above
code returns 111. When I choose 333, the code also returns 111. I can't
understand why it does not return the value for a current record.