Unanswered: New form based off previous forms combo box values
I have a prompt form where I am using 2 combo boxes. The first combo box is there to select a supervisor… collecting their ID and their Name. The second combo box is there to select an employee based off of the supervisor selection; collecting the employee ID, their Name and their Current Position. I want the selections made in the prompt form to populate the next form I intend to open. I made both pieces of the code I created to handle the prompt logic public in anticipation of having to share the stored string values for the supervisor and employee, perhaps in a module, to pass to the next piece of code to open the next form. So far I am grabbing their ID but I would like to collect and store the name values and the current position to pass to the next form. I would like to open the next data entry form with the supervisor and employee information populated but I do not want to write the record to the table until the form is entirely populated and a save feature is activated based off of form level validation. I want to either write a new record to the table where the data is to be stored for the employees or based off of a feature, yet to be developed, I would like to allow a historic record to be edited based off a date selection, most likely I will use a combo box... but I will need to develop some historic data records to assist with development of that feature. I have created a table for the data to be stored, unfortunately there is no historic data because the excel files used prior to this system require a good deal of work to extract that historic information. How can I open the next form and retain the values for supervisor ID, supervisor Name, employee ID, employee Name and employee Current Position without writing to the table in preparation of creating a new record once the new form is filled completely?
I would be all set if I were working with just the Supervisor ID... But I want to pass; Me.cboSupervisor.Column(0), Me.cboSupervisor.Column(1), Me.cboEmployee.Column(0), Me.cboEmployee.Column(1) and Me.cboEmployee.Column(4) any suggestions on how to write this code?
Public Sub cboEmployee_AfterUpdate()
Dim strEmpID As String
Dim strEmpName As String
Dim strEmpPosition As String
Leave it to me to try something UNORTHODOX... I had to catch up a bit because the design database I was working with became corrupt, most likely due to the code I am attempting to create, I am able to carry the ID onto the next data entry form from the prompt form. When I tried to pull more information; supervisor Name, employee ID, employee Name and employee Current Position the feature began bellyaching that there was too much data. I am continuing development and will approach the overall solution from a different direction. Thank you for your help getting at least the ID value to the next form! My best, Rob