G
Guest
Hi,
I'm just trying to build some confiditional formatting within a form.
Basically if field 1 =x then field 2 back color should change and allow input
else, it shouldn't allow any data entry.. Here is the code that I'm using ...
I get no error message but it just doesn't work...
Thanks so much in advance,
Kanga
Private Sub Revenue_recognized_or_Reversal_reason_AfterUpdate(
If Me.Revenue_recognized_or_Reversal_reason = "Sale and lease back" Then
Me.Contract_Start_Date.Locked = False And Me.Contract_Duration.Locked = False
And Me.Amortization.Locked = False And Me.Contract_Start_Date.BackColor =
52479 And Contract_Duration.BackColor = 52479 And Me.Amortization.BackColor =
52479 Else If Me.Revenue_recognized_or_Reversal_reason = "Extended Warranty"
Then Me.Contract_Start_Date.Locked = False And Me.Contract_Duration.Locked =
False And Me.Amortization.Locked = False And Me.Contract_Start_Date.BackColor
= 52479 And Me.Contract_Duration.BackColor = 52479 And
Me.Amortization.BackColor = 52479 Else: Me.Contract_Start_Date.Locked = True
And Me.Contract_Duration.Locked = True And Me.Amortization.Locked = True
End Sub
I'm just trying to build some confiditional formatting within a form.
Basically if field 1 =x then field 2 back color should change and allow input
else, it shouldn't allow any data entry.. Here is the code that I'm using ...
I get no error message but it just doesn't work...
Thanks so much in advance,
Kanga
Private Sub Revenue_recognized_or_Reversal_reason_AfterUpdate(
If Me.Revenue_recognized_or_Reversal_reason = "Sale and lease back" Then
Me.Contract_Start_Date.Locked = False And Me.Contract_Duration.Locked = False
And Me.Amortization.Locked = False And Me.Contract_Start_Date.BackColor =
52479 And Contract_Duration.BackColor = 52479 And Me.Amortization.BackColor =
52479 Else If Me.Revenue_recognized_or_Reversal_reason = "Extended Warranty"
Then Me.Contract_Start_Date.Locked = False And Me.Contract_Duration.Locked =
False And Me.Amortization.Locked = False And Me.Contract_Start_Date.BackColor
= 52479 And Me.Contract_Duration.BackColor = 52479 And
Me.Amortization.BackColor = 52479 Else: Me.Contract_Start_Date.Locked = True
And Me.Contract_Duration.Locked = True And Me.Amortization.Locked = True
End Sub