Need Help - Access Form

Fandy

Member
Local time
Yesterday, 23:06
Joined
Mar 26, 2021
Messages
37
Payments.JPG

Question:
Please I want to deactivate these fields (Trans Details, Service Rate, Quantity & Bill Amount) when PAYMENT is selected
from Trans Type Field. Can someone assist me to do in my form above?
 
Set their enabled property to False in the AfterUpdate Event of the combo if it is Payment type?
 
Set their enabled property to False in the AfterUpdate Event of the combo if it is Payment type?
can you help with the code statement please?
 
Code:
If Me.TransType = 1 '<whatever the value of Payment is meant to be?> then
    Me.TransDetails.Enabled = False
Else
    Me.TransDetails.Enabled = True
End If

You will likely need similar code in the Current event of the form if you need it as you move through the records.?
Perhaps just call that event?

Another method might be
Code:
Me.TransDetails.Enabled = Me.TransType <> 1 '<whatever the value of Payment is meant to be?>

You can add the other controls in a similar manner.
 
Code:
If Me.TransType = 1 '<whatever the value of Payment is meant to be?> then
    Me.TransDetails.Enabled = False
Else
    Me.TransDetails.Enabled = True
End If

You will likely need similar code in the Current event of the form if you need it as you move through the records.?
Perhaps just call that event?

Another method might be
Code:
Me.TransDetails.Enabled = Me.TransType <> 1 '<whatever the value of Payment is meant to be?>

You can add the other controls in a similar manner.
can you do it step by step for me please. I'm a baby in coding. I'm now learning it.
 

Users who are viewing this thread

Back
Top Bottom