You might need to test the value because the first control will stay locked so:
In the Form_Current event
If Not IsNull(Me!firstcontrol) Then
Me!nextcontrol.SetFocus
Me!firstcontrol.Locked = True
Else
Me!firstcontrol.Locked = False
End If
Now if the control is empty when you open a new record you will be able to edit it. you can't unlock or lock a control whilst it has the focus so you have to move first.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.