Patrick O'Dea
asked on
Disabling a field based on another
See my VBA below.
I have not used this before.
When I compile the "Enabled" bit is highlighted with an error "Invalid Use Of Property".
Is my syntax wrong??
I have tried different combinations but no joy!
I have not used this before.
When I compile the "Enabled" bit is highlighted with an error "Invalid Use Of Property".
Is my syntax wrong??
I have tried different combinations but no joy!
Private Sub Form_Current()
If tblCustomers.OverrideYN = "Y" Then Me.OverRidePrice.Enabled
Else
Me.OverRidePrice.Locked
End If
End Sub
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can say
if x then ...
because that gets interpreted as
if x is true then....
But when assigning values an ' = True/false' must be used.
if x then ...
because that gets interpreted as
if x is true then....
But when assigning values an ' = True/false' must be used.
ASKER
Thanks Peter,
I will try to remember that one.
I will try to remember that one.
ASKER
I should have known that one!