I have a Main Form called frmProject_Management
On this form is a List Box in which users select a Project.
The form then contains a Subform Container called "subformTasks". The actual form displayed in that container is called "subfrmProject_Tasks".
- Main Form = frmProject_Management
- List Box (on Main Form) = listProjects
- Subform Container (on Main Form) = subformTasks
- Actual Form Name That Appears in subformTasks = subfrmProject_Tasks
- Text Box (in Subform) = txtProjIDSub
I'm looking to have that Text Box located in the Subform (txtProjectID) simply display the bound value that's in the List Box (which represents the Project ID #).
I've tried multiple things but the Text Box on the Subform remains blank. I also have a Text Box on the main form that displays the Project ID # value from the List Box. That works perfectly fine. I just can't seem to pass that value to the Text Box on my subform.
I've looked here and tried various syntax:
https://bytes.com/topic/access/insig...items-sub-form
This is how I currently have it coded; like I said, the Text Box on the Main Form (txtProjIDMain) works fine. When I pick a Project from the List Box, the associated Project # appears in that Text Box. However, the Text Box on the Subform is blank.
Code:Private Sub lstOpen_Click() Set ctlrole = Me.txtProjIDMain 'Hidden Text Box on the Main Form Set ctlrole2 = Me.[subformCompletedTasks].Form.[txtProjIDSub] 'Display the Project ID # for the Project Selected in the List Box in the txtProjName1 (hidden) control ctlrole = Me.lstOpen.Column(0) ctlrole2 = Me.lstOpen.Column(0) Me.Requery End Sub