The Current event of your form fires when you move record. Use this event to
set the Locked property of the 3 text boxes, depending on whether it is a
new record or not.
1. Open the form in design view.
2. Open the Properties box (View menu.)
Make sure the Title of the Properties box reads Form, so you are looking at
the properties of the form, not those of a text box.
3. On the Event tab of the Properties box, set the On Current property to:
[Event Procedure]
4. Click the Build button (...) beside this.
Access opens the code window.
Set up to code like this:
Private Sub Form_Current()
Dim bLock As Boolean
bLock = Not Me.NewRecord
If Me.[Accomplishments].Locked <> bLock Then
Me.[Accomplishments].Locked = bLock
Me.[Outstanding Issues].Locked = bLock
Me.[Risks] = bLock
End If
End Sub
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reply to group, rather than allenbrowne at mvps dot org.
NP said:
Hi Allen,
Now that I have my tables working and form layout designed. I would like
to
do the following:
1. Have users add comments to the following fields: Accomplishments,
Outstanding Issues and Risks.
2. Once they have added their comments to the three fields, I want those
comments to be viewable (w/a running history) but not editable.
What would be the best way to address this? If VBA, do you know how to
write this code?
Thank you in advance for your assistance.