N
nybaseball22
Hello,
I have a tabular form where the Got Focus Code is to activate and
deactivate certain fields based on my selection in one of the fields.
However, when the load happens, it applies the code to the selection
from the first record on the form only. Is there a way to change the
code so that it will apply to each individual record? I have it set
for the Got Focus on my date field, as this is the first field on all
of the forms. I could add it to the form for On Load, etc, but it
isn't working. If you know how to make it work, I am certainly
willing to make a change. The code reads:
If Me.Transaction_Type = "Deposit" Then
Me.Withdraw_Amount.Enabled = False
Me.Expense_Class.Enabled = False
Me.Payment_Method.Enabled = False
Me.Deposit_Amount.Enabled = True
ElseIf Me.Transaction_Type = "Withdraw" Then
Me.Withdraw_Amount.Enabled = True
Me.Expense_Class.Enabled = True
Me.Payment_Method.Enabled = True
Me.Deposit_Amount.Enabled = False
Else
' Any other options
End If
Thanks for the help.
I have a tabular form where the Got Focus Code is to activate and
deactivate certain fields based on my selection in one of the fields.
However, when the load happens, it applies the code to the selection
from the first record on the form only. Is there a way to change the
code so that it will apply to each individual record? I have it set
for the Got Focus on my date field, as this is the first field on all
of the forms. I could add it to the form for On Load, etc, but it
isn't working. If you know how to make it work, I am certainly
willing to make a change. The code reads:
If Me.Transaction_Type = "Deposit" Then
Me.Withdraw_Amount.Enabled = False
Me.Expense_Class.Enabled = False
Me.Payment_Method.Enabled = False
Me.Deposit_Amount.Enabled = True
ElseIf Me.Transaction_Type = "Withdraw" Then
Me.Withdraw_Amount.Enabled = True
Me.Expense_Class.Enabled = True
Me.Payment_Method.Enabled = True
Me.Deposit_Amount.Enabled = False
Else
' Any other options
End If
Thanks for the help.