As to the first question:
Code:
Private Sub Form_Current()
If Nz(Me.[Hull no], "") <> "" Then
[Hull no].Locked = True
Else
[Hull no].Locked = False
End If
If Nz(Me.[Contract No], "") <> "" Then
[Contract No].Locked = True
Else
[Contract No].Locked = False
End If
End Sub
I prefer the above because it makes it clearer what is going on, but this works, as well:
Code:
Private Sub Form_Current()
[Hull no].Locked = (Nz(Me.[Hull no], "") <> "")
[Contract No].Locked = (Nz(Me.[Contract No], "") <> "")
End Sub
You'll have to replace [Hull no] and [Contract No] with your exact names, of course.
I'm afraid I don't quite understand your second question; could you give a little more detail as to what you mean by
I want the hull no to be repeated and the contract no.
But not allow any changes to those two fields.
Linq ;0)>
The problem with making anything foolproof...is that fools are so darn ingenious!
All posts/responses based on Access 2003/2007