G
Guest
I have some code behind a forms On Current event.
Private Sub Form_Current()
'Set Locked property based on whether user is entering a new record
Dim fLocked As Boolean
fLocked = Not Me.NewRecord
[CLIENT_NUMBER].Locked = fLocked
[Client_Name].Locked = fLocked
End Sub
If the client_Number and Client_Name fields are filled in (not a new record)
I would like those fields locked (not able to overwrite). If the record is
not new and those fields are NOT filled in, I would like those fields to be
unlocked also - just like if the record was new. I don't know how to adjust
the code to handle this. A person can fill in some of the form fields and
come back later to fill in the Client_Number or Client_Name. I need help.
Private Sub Form_Current()
'Set Locked property based on whether user is entering a new record
Dim fLocked As Boolean
fLocked = Not Me.NewRecord
[CLIENT_NUMBER].Locked = fLocked
[Client_Name].Locked = fLocked
End Sub
If the client_Number and Client_Name fields are filled in (not a new record)
I would like those fields locked (not able to overwrite). If the record is
not new and those fields are NOT filled in, I would like those fields to be
unlocked also - just like if the record was new. I don't know how to adjust
the code to handle this. A person can fill in some of the form fields and
come back later to fill in the Client_Number or Client_Name. I need help.