Hello,
Suppose I have two forms, Form1 and Form2, both of which are open. Form1 has three fields, EmployeeID (Primary Key), EmployeeName and EmploymentDate. There is a combo box on the form that finds the record based on the selection made in the combo box (using the built-in VBA), call it "combobox1" . Form2 has a combo box of EmployeeID and EmployeeName, with EmployeeID being the bound field, call it "combobox2" .
What would be the VBA code that would take the EmployeeID selected on Form2 and find the related record on Form1? I've been able to set the "combobox1" to the value selected in "combobox2" but I've been unsuccessful in having Form1 subsequently find the record.
Any help would be greatly appreciated.
Suppose I have two forms, Form1 and Form2, both of which are open. Form1 has three fields, EmployeeID (Primary Key), EmployeeName and EmploymentDate. There is a combo box on the form that finds the record based on the selection made in the combo box (using the built-in VBA), call it "combobox1" . Form2 has a combo box of EmployeeID and EmployeeName, with EmployeeID being the bound field, call it "combobox2" .
What would be the VBA code that would take the EmployeeID selected on Form2 and find the related record on Form1? I've been able to set the "combobox1" to the value selected in "combobox2" but I've been unsuccessful in having Form1 subsequently find the record.
Any help would be greatly appreciated.
Comment