I'm still using Access 2003 to manage our membership database, is it possible to lock a field(member's name) if the membership is equal to withdrawal or terminated? Kindly help!!!
In the AfterUpdate it would only be tested after the MemberName was changed. This would be too late. The test must be performed in the OnCurrent event to that it is tested each time the current record is changed.
However this would leave the control permanently Locked after the first time one of the values was encountered becuase there is nothing to ever change it back.
By far the easiest way to do this task is with ConditionalFormatting.
Save the design with Enabled = No on MemberName.
In the ConditionalFormatting on the MemberName control:
Expression Is
Code:
[Membership] <> "terminated" And [Membership] <> "withdrawal"
Tick the Enable checkbox.
This technique also has a major advantage that it can be used in ContinuousForms.