Here is the code for the 4 comboboxes that I am having trouble with. Just to let you know, there is a 5th combobox that has similar AfterUpdate code, but is not causing a problem.
Combobox1 - cboEmplStatus:
SELECT tblEmployeeStatus.StatusCode, tblEmployeeStatus.StatusDescr
FROM tblEmployeeStatus;
Private Sub cboEmplStatus_AfterUpdate()
' 1 - Cascades (updates) the txtStatusDescr textbox with value
' from 2nd column of the cboEmplStatus combobox's Row Source
' depending on Employee Status chosen.
Me.txtStatusDescr = Me.cboEmplStatus.Column(1) ' 1
End Sub
Combobox2 - cboEmployeeType:
SELECT DISTINCTROW tblEmployeeType.EmployeeTypeCode, tblEmployeeType.EmployeeTypeDescr
FROM tblEmployeeType;
Private Sub cboEmployeeType_AfterUpdate()
' 1 - Cascades (updates) the txtEmployeeTypeDescr textbox with value
' from 2nd column of the cboEmployeeType combobox's Row Source
' depending on Employee Type chosen.
Me.txtEmployeeTypeDescr = Me.cboEmployeeType.Column(1) ' 1
End Sub
Combobox3 - cboFullPartTime:
SELECT DISTINCTROW tblHourType.HourTypeCode, tblHourType.HourTypeDescr
FROM tblHourType;
Private Sub cboFullPartTime_AfterUpdate()
' 1 - Cascades (updates) the txtFullPartTime textbox with value
' from 2nd column of the cboFullPartTime combobox's Row Source
' depending on Full/PartTime chosen.
Me.txtFullPartTime = Me.cboFullPartTime.Column(1) ' 1
End Sub
Combobox4 - cboJobCode:
SELECT DISTINCTROW tblJobCode.JobCode, tblJobCode.JobTitle, tblFLSAStatus.FLSAStatusDescr, tblJobCode.ClassCode, tblJobCode.EEOCode
FROM tblFLSAStatus RIGHT JOIN tblJobCode ON tblFLSAStatus.FLSAStatusCode = tblJobCode.FLSAStatus
ORDER BY tblJobCode.JobCode;
Private Sub cboJobCode_AfterUpdate()
' 1 - Cascades (updates) the txtJobTitle textbox with value from
' 2nd column of the cboJobCode combobox's Row Source depending
' on Job Code chosen.
' AND
' 2 - Cascades (updates) the txtFLSAStatus textbox with value from
' 3rd column of the cboJobCode combobox's Row Source depending
' on Job Code chosen.
' AND
' 3 - Cascades (updates) the txtClassCode textbox with value from
' 4th column of the cboJobCode combobox's Row Source depending
' on Job Code chosen.
' AND
' 4 - Cascades (updates) the txtEEOCode textbox with value from
' 5th column of the cboJobCode combobox's Row Source depending
' on Job Code chosen.
Me.txtJobTitle = Me.cboJobCode.Column(1) ' 1
Me.txtFLSAStatus = Me.cboJobCode.Column(2) ' 2
Me.txtClassCode = Me.cboJobCode.Column(3) ' 3
Me.txtEEOCode = Me.cboJobCode.Column(4) ' 4
End Sub