As you probably know, you can open a form in either data entry or non-data entry mode using the DoCmd.OpenForm syntax and arguments.
Probably the easiest way to handle this is to set those fields you want locked when not in data entry mode, to Locked = True.
Then in the OnOpen event of the form, add the following:
If Me.DataEntry = True Then
Me.Field1.Locked = False
Me.Field2.Locked = False
Me.Field3.Locked = False
...
End If
Use your own field names of course.