J
John
(Access XP) I have a Company form with a subform containing a list of
Employees in the Company. The Employee list subform also contains an Add
button if the user wants to add a new Employee to the Company. It opens a
new Employee form then when that form is saved, it returns to the original
Company form and the new Employee shows up in the subform list of Employees.
I would like to pre-populate the CompanyID field in the new Employee form
(the link field between the two forms) when a new Employee form is opened
from within the Employee list subform but I can't figure out how to do it.
This is the openform code I'm using:
DoCmd.OpenForm strFormName, , , , acFormAdd, acDialog, "GotoNew"
The CompanyID is obviously in the Company form but I can't figure out how to
send it to the new Employee form.
Thank you very much. Any ideas greatly appreciated.
Penn
Employees in the Company. The Employee list subform also contains an Add
button if the user wants to add a new Employee to the Company. It opens a
new Employee form then when that form is saved, it returns to the original
Company form and the new Employee shows up in the subform list of Employees.
I would like to pre-populate the CompanyID field in the new Employee form
(the link field between the two forms) when a new Employee form is opened
from within the Employee list subform but I can't figure out how to do it.
This is the openform code I'm using:
DoCmd.OpenForm strFormName, , , , acFormAdd, acDialog, "GotoNew"
The CompanyID is obviously in the Company form but I can't figure out how to
send it to the new Employee form.
Thank you very much. Any ideas greatly appreciated.
Penn