Subform Record On Main Form

  • Thread starter Thread starter Joseph Misko
  • Start date Start date
J

Joseph Misko

Hello! I have a subform showing multiple records linked to the single
record displayed on my main form. When the user scrolls through the subform
records, I would like to show that single record in individual fields on the
main form. I haven't come up with a way to do this yet. Is there a way?

Many thanks,
Joe
 
Joseph Misko said:
Hello! I have a subform showing multiple records linked to the single record
displayed on my main form. When the user scrolls through the subform records,
I would like to show that single record in individual fields on the main form.
I haven't come up with a way to do this yet. Is there a way?

Each control in the main form would have a ControlSource expression similar
to...

=SubFormControlName.Form!FieldName

(the SubForm *control* might not have the same name as the form it is
displaying)
 
Sorry! I did figure out how to get that. What I meant to ask for is how to
get the controls on the main form editable.

Many thanks,
Joe
 
Joseph Misko said:
Sorry! I did figure out how to get that. What I meant to ask for is how to
get the controls on the main form editable.

Many thanks,

I believe you would have to use an additional subform then and having two
subforms both looking at the same record could interfere with doing edits.

Alternative is to execute code in the Current event of the subform that pushes
the subform's values into unbound controls on the main form and then after
making changes to the unbound controls you could execute an update query in code
to push the new values into the table the subform is based on.
 
Back
Top