J
Joshua Beel
How do I bind what is displayed in the controls of my form to what is
selected within the subform?
selected within the subform?
Ken Sheridan said:From your brief description I'm not quite sure what you have in mind, but if
you mean you want to reference a control in a subform as the ControlSource
property of a control in the parent form then you do so via the Form property
of the subform control (that's the control in the parent form which houses
the subform), so the syntax is:
=[SubformControlName].[Form].[NameOfControlOnSubform]
Bear in mind that if the control on a subform is a combo box its value might
not necessarily be the value you see in it, but a hidden column, e.g. a
numeric ID number corresponding to a visible text value. If so then you
would need to add a reference to the relevant column by means of the combo
box's Column property. This is zero-based so referencing the second column
would be Column(1), the third column Column(2) and so on.
You use the term 'bind' but the control in the parent form in the above case
would of course be an unbound control, so if you have something else in mind
post back with a more detailed description of your requirement.
Ken Sheridan
Stafford, England
Joshua Beel said:How do I bind what is displayed in the controls of my form to what is
selected within the subform?
Joshua Beel said:Thank you for your reply Ken.
I think I need to better specify the issue. I would like to create a form
that is similar in functionality to the Split form, in which when you
select
a record from within the table in the split form, it displays all
information
within the controls of the main form.
Ken Sheridan said:From your brief description I'm not quite sure what you have in mind, but
if
you mean you want to reference a control in a subform as the
ControlSource
property of a control in the parent form then you do so via the Form
property
of the subform control (that's the control in the parent form which
houses
the subform), so the syntax is:
=[SubformControlName].[Form].[NameOfControlOnSubform]
Bear in mind that if the control on a subform is a combo box its value
might
not necessarily be the value you see in it, but a hidden column, e.g. a
numeric ID number corresponding to a visible text value. If so then you
would need to add a reference to the relevant column by means of the
combo
box's Column property. This is zero-based so referencing the second
column
would be Column(1), the third column Column(2) and so on.
You use the term 'bind' but the control in the parent form in the above
case
would of course be an unbound control, so if you have something else in
mind
post back with a more detailed description of your requirement.
Ken Sheridan
Stafford, England
Joshua Beel said:How do I bind what is displayed in the controls of my form to what is
selected within the subform?
Joshua Beel said:Thank you for your reply Ken.
I think I need to better specify the issue. I would like to create a form
that is similar in functionality to the Split form, in which when you select
a record from within the table in the split form, it displays all information
within the controls of the main form.
Ken Sheridan said:From your brief description I'm not quite sure what you have in mind, but if
you mean you want to reference a control in a subform as the ControlSource
property of a control in the parent form then you do so via the Form property
of the subform control (that's the control in the parent form which houses
the subform), so the syntax is:
=[SubformControlName].[Form].[NameOfControlOnSubform]
Bear in mind that if the control on a subform is a combo box its value might
not necessarily be the value you see in it, but a hidden column, e.g. a
numeric ID number corresponding to a visible text value. If so then you
would need to add a reference to the relevant column by means of the combo
box's Column property. This is zero-based so referencing the second column
would be Column(1), the third column Column(2) and so on.
You use the term 'bind' but the control in the parent form in the above case
would of course be an unbound control, so if you have something else in mind
post back with a more detailed description of your requirement.
Ken Sheridan
Stafford, England
Joshua Beel said:How do I bind what is displayed in the controls of my form to what is
selected within the subform?