Say the control on the form is called myName and the next field on the form is myAddress
Then in the After_Update event of myName put the following code
myAddress.setfo cus
myName.locked=t rue
myName.enabled= false
(You have to change the focus before you disable the control)
If you are doing this with lots of fields, be careful where you set the focus to, because if you try to setfocus to a control that is disabled it will fall over.
You will need to think carefully (and post the results of your thoughts too of course) about exactly which circumstances are required to trigger the locking, and very importantly too, exactly when they should be unlocked.
If you can phrase the question fully and clearly we can certainly help further. For now, I will simply draw your attention to the .Locked available for every control.
Comment