Private Sub txtUnitCode_AfterUpdate()
Me.txtUnitCode.Locked = True
End Sub
Private Sub Form_Current()
If Len(Me.txtUnitCode & vbNullString) > 0 Then
Me.txtUnitCode.Locked = True
Else
Me.txtUnitCode.Locked = False
End If
End Sub
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access Downloads http://www.datastrat.com http://www.mvps.org/access