Hi all,
I am working on a form(A) with subform(A1) based on a Project Master(TM0001) and Project Detail(TM0002) with parent/child relationship.The primary key is Project ID. This two form is created by using the wizard.
In main Form A there is a combobox (PID) with this sql code
SELECT [TM0001].[Project ID], [TM0001].[Project Name] FROM TM0001;
so user will need to select the project ID and then another combobox(TOwner) will display the various member of this project using this sql :
SELECT DISTINCT [TM0002].[Task Owner] FROM TM0001 INNER JOIN TM0002 ON [TM0001].[Project ID]=[TM0002].[Project ID] WHERE ((([TM0001].[Project ID])=[Forms]![frmTM0001]![PID]));
After user had selected the owner , in the cbox TOwner On Click event, I want the subform the display the filtered record of those record owns by the value selected in the TOwner only.
So any help here !!!
Another question is how to we reference a control in a subform from the mainform in Code Editor. I try to assign some values using this code from the main form:
Forms![frmTM0001]![frmTM0002_Subform]![txtTaskOwner] = Me!cmbOwner where txtTaskOwner source is a field in a TM0002.
Thank beforehand
Mderby
I am working on a form(A) with subform(A1) based on a Project Master(TM0001) and Project Detail(TM0002) with parent/child relationship.The primary key is Project ID. This two form is created by using the wizard.
In main Form A there is a combobox (PID) with this sql code
SELECT [TM0001].[Project ID], [TM0001].[Project Name] FROM TM0001;
so user will need to select the project ID and then another combobox(TOwner) will display the various member of this project using this sql :
SELECT DISTINCT [TM0002].[Task Owner] FROM TM0001 INNER JOIN TM0002 ON [TM0001].[Project ID]=[TM0002].[Project ID] WHERE ((([TM0001].[Project ID])=[Forms]![frmTM0001]![PID]));
After user had selected the owner , in the cbox TOwner On Click event, I want the subform the display the filtered record of those record owns by the value selected in the TOwner only.
So any help here !!!
Another question is how to we reference a control in a subform from the mainform in Code Editor. I try to assign some values using this code from the main form:
Forms![frmTM0001]![frmTM0002_Subform]![txtTaskOwner] = Me!cmbOwner where txtTaskOwner source is a field in a TM0002.
Thank beforehand
Mderby