Link to home
Start Free TrialLog in
Avatar of PJ_KD
PJ_KD

asked on

How to update a form field from a subform field

I have a form that contains a job supervisor's name field.  The subform has the many supervisors that could be the actual job supervisor.  I want the form's supervisor field to be populated by the correct supervisor based on the user scrolling through the subforms' content .  When they find the correct supervisor, I want the user to hit a button on either the form or subform (whichever you think is best) to update the form's job supervisor's name with the correct supervisor's name from the subform.  Please help me determine how to make this work.  Thank you.
Avatar of Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Boyd (HiTechCoach) Trimmell, Microsoft Access MVP 2010-2015
Flag of United States of America image

I would recommend using a combo box to select the supervisor instead of a sub form.   It is also much easy to implement.
Avatar of PJ_KD
PJ_KD

ASKER

Could the combo box be based on content from the other record?  (There is a JO record that is the source of the main form and the Contact record is the basis of the subform.)  If so, how would that be done?  Also, there are three fields involved which are the first and last name for the supervisor and the supervisor's email address.
ASKER CERTIFIED SOLUTION
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Yes, that should work as well. The syntax:

me.parent.controlname = xxx

should work, what error are you getting.
Avatar of PJ_KD

ASKER

I appreciate the help.  I didn't get a chance to go back and see the error message generated by the original recoemmended solution but that hit allowed me to work through to a solution that I have now implemented in my database.  Much appeciated..