R
ryan.fitzpatrick3
I have a subform with freight components on it. I have it were if I
click a checkbox it'll run the following code where it'll disenable
the textbox selections until the checkbox is clicked "active" (enabled
or checked again). This works fine, but when I go to a new record, if
clicked "not active", the new record textbox remains disenabled. Is
there away for that to effect the direct record and not all records?
Thanks in advance.
Ryan
Private Sub FreightDivisionActive_Click()
If FreightDivisionActive = False Then
FreightAmount.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightAmount.Enabled = True
End If
If FreightDivisionActive = False Then
FreightLumpers.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightLumpers.Enabled = True
End If
If FreightDivisionActive = False Then
FreightFuelSurcharge.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightFuelSurcharge.Enabled = True
End If
If FreightDivisionActive = False Then
FreightZipCode.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightZipCode.Enabled = True
End If
If FreightDivisionActive = False Then
FreightTotalDelCosts.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightTotalDelCosts.Enabled = True
End If
If FreightDivisionActive = False Then
FreightCasesPerPallet.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightCasesPerPallet.Enabled = True
End If
If FreightDivisionActive = False Then
OptGroupFreight.Enabled = False
ElseIf FreightDivisionActive = True Then
OptGroupFreight.Enabled = True
End If
If FreightDivisionActive = False Then
FreightTLQuantity.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightTLQuantity.Enabled = True
End If
If FreightDivisionActive = False Then
FreighthalfLTLQuantity.Enabled = False
ElseIf FreightDivisionActive = True Then
FreighthalfLTLQuantity.Enabled = True
End If
If FreightDivisionActive = False Then
FreightthirdLTLQuantity.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightthirdLTLQuantity.Enabled = True
End If
End Sub
click a checkbox it'll run the following code where it'll disenable
the textbox selections until the checkbox is clicked "active" (enabled
or checked again). This works fine, but when I go to a new record, if
clicked "not active", the new record textbox remains disenabled. Is
there away for that to effect the direct record and not all records?
Thanks in advance.
Ryan
Private Sub FreightDivisionActive_Click()
If FreightDivisionActive = False Then
FreightAmount.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightAmount.Enabled = True
End If
If FreightDivisionActive = False Then
FreightLumpers.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightLumpers.Enabled = True
End If
If FreightDivisionActive = False Then
FreightFuelSurcharge.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightFuelSurcharge.Enabled = True
End If
If FreightDivisionActive = False Then
FreightZipCode.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightZipCode.Enabled = True
End If
If FreightDivisionActive = False Then
FreightTotalDelCosts.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightTotalDelCosts.Enabled = True
End If
If FreightDivisionActive = False Then
FreightCasesPerPallet.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightCasesPerPallet.Enabled = True
End If
If FreightDivisionActive = False Then
OptGroupFreight.Enabled = False
ElseIf FreightDivisionActive = True Then
OptGroupFreight.Enabled = True
End If
If FreightDivisionActive = False Then
FreightTLQuantity.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightTLQuantity.Enabled = True
End If
If FreightDivisionActive = False Then
FreighthalfLTLQuantity.Enabled = False
ElseIf FreightDivisionActive = True Then
FreighthalfLTLQuantity.Enabled = True
End If
If FreightDivisionActive = False Then
FreightthirdLTLQuantity.Enabled = False
ElseIf FreightDivisionActive = True Then
FreightthirdLTLQuantity.Enabled = True
End If
End Sub