Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reference subform on parent form with command button

Status
Not open for further replies.

srm5j

Programmer
Jul 11, 2018
1
US
I would appreciate any insight someone could give me. I have been stuck on this for the past two weeks trying everything I can think of and research.

I have a database in Access. I have a keyword search on my "UpdateTraining" (parent form) that brings up the options in my "SubTrainingSearch2" (subform). When I click my "Command14" button that is on the "SubTrainingSearch2" form, I want my "TrainName" (txtbx) on my parent form to populate with the option that is selected. The TrainName control source is tied to the table because it inputs the information into the table when the parent form "save" button is to be clicked.

I am sure I have thoroughly confused everyone...

I have been able to pull the data from the subform into textboxes and would love to refer to those textboxes but the two textboxes on the parent form will not equal each other.
 

This might be what you are looking for...

Forms("ParentForm").Form.Controls("FieldOnTheParentForm").Value = Me.Controls("FieldOnTheSubForm").Value

Simi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top