I have a nested forms 5 deep. The code is on the After Update event of a combo box control on the 1st Parent form. The intention is that when a user selects #2 from the drop-down on that first form, that certain controls in the nested forms will be disabled. The code works correctly for all of the controls except for the ShopName control (the last in the list). If I add a " ' " to the front of the line to make it a note, everything else works. The controls are all on the same subform and I've double-checked to make sure the control name is correct. Please help!
Thank you so much!
Code:
Private Sub FileType_AfterUpdate() If (Me.FileType = "2") Then Me!sfrmInspection.Form!sfrmLocation.Form!frmDamage.Form!sfrmEstimate.Form!Days.Enabled = False Me!sfrmInspection.Form!sfrmLocation.Form!frmDamage.Form!sfrmEstimate.Form!TotalLoss.Enabled = False Me!sfrmInspection.Form!sfrmLocation.Form!frmDamage.Form!sfrmEstimate.Form!lbPartCo.Enabled = False Me!sfrmInspection.Form!sfrmLocation.Form!frmDamage.Form!sfrmEstimate.Form!Command24.Enabled = False Me!sfrmInspection.Form!sfrmLocation.Form!frmDamage.Form!sfrmEstimate.Form!ShopName.Enabled = False End If End Sub
Comment