GOAL: Select an employee and project from a continuous form and open the associated employee form and project subform.
I have a table (Employees) with a primary field EmpID. And I have a related table Projects that includes the EmpID. It also has the primary field ProjID)
I have a parent form (frmEmp) and a subform (frmSubProj) related by EmpID.
I have a continuous form (frmEmpProj) that includes details for all EmpID and ProjID records
I want to select a record from the continuous form, then open both frmEmp and the appropriate frmSubProj
At the moment, I am doing this by using macro1 and opening the frmEmp with the WHERE clause: [EmpID]=[Forms]![frmEmpProj]![EmpId].
This opens up the correct employee record , but is showing the first Project record. How do I modify my code to open the project record selected?
An example would be very useful, as I am just learning how to do VBA coding.
I have a table (Employees) with a primary field EmpID. And I have a related table Projects that includes the EmpID. It also has the primary field ProjID)
I have a parent form (frmEmp) and a subform (frmSubProj) related by EmpID.
I have a continuous form (frmEmpProj) that includes details for all EmpID and ProjID records
I want to select a record from the continuous form, then open both frmEmp and the appropriate frmSubProj
At the moment, I am doing this by using macro1 and opening the frmEmp with the WHERE clause: [EmpID]=[Forms]![frmEmpProj]![EmpId].
This opens up the correct employee record , but is showing the first Project record. How do I modify my code to open the project record selected?
An example would be very useful, as I am just learning how to do VBA coding.