F Fandy Member Local time Yesterday, 23:06 Joined Mar 26, 2021 Messages 37 Apr 1, 2021 #1 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?
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?
Gasman Enthusiastic Amateur Local time Today, 00:06 Joined Sep 21, 2011 Messages 17,079 Apr 1, 2021 #2 Set their enabled property to False in the AfterUpdate Event of the combo if it is Payment type?
F Fandy Member Local time Yesterday, 23:06 Joined Mar 26, 2021 Messages 37 Apr 1, 2021 #3 Gasman said: Set their enabled property to False in the AfterUpdate Event of the combo if it is Payment type? Click to expand... can you help with the code statement please?
Gasman said: Set their enabled property to False in the AfterUpdate Event of the combo if it is Payment type? Click to expand... can you help with the code statement please?
Gasman Enthusiastic Amateur Local time Today, 00:06 Joined Sep 21, 2011 Messages 17,079 Apr 1, 2021 #4 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.
F Fandy Member Local time Yesterday, 23:06 Joined Mar 26, 2021 Messages 37 Apr 1, 2021 #5 Gasman said: 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. Click to expand... can you do it step by step for me please. I'm a baby in coding. I'm now learning it.
Gasman said: 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. Click to expand... can you do it step by step for me please. I'm a baby in coding. I'm now learning it.
Gasman Enthusiastic Amateur Local time Today, 00:06 Joined Sep 21, 2011 Messages 17,079 Apr 1, 2021 #6 So now woul be a good time to start.? You will not get easier coding than this.? Watch some videos, see link below https://www.youtube.com/results?search_query=vba+code+access+form+events
So now woul be a good time to start.? You will not get easier coding than this.? Watch some videos, see link below https://www.youtube.com/results?search_query=vba+code+access+form+events