Re: Macro to Lock Data in a Field Once Record is Saved



Or, using an ACCESS macro that is attached to the form's OnCurrent property:

Action: SetValue
Item: NameOfControl.Locked
Expression: Not [NewRecord]

--

Ken Snell
<MS ACCESS MVP>



"Ken Snell (MVP)" <kthsneisllis9@xxxxxxxxxxxxxxxxxx> wrote in message
news:%23EHHbEi5IHA.3768@xxxxxxxxxxxxxxxxxxxxxxx
Use the form's Current event to test the NewRecord property, and set the
Locked property for the control accordingly:

Private Sub Form_Current()
Me.NameOfControl.Locked = Not Me.NewRecord
End Sub

--

Ken Snell
<MS ACCESS MVP>


"Banda" <Banda@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:516F876C-2322-4E43-8F40-190D80AB3F6B@xxxxxxxxxxxxxxxx

i would like to run a macro that will deny user to change data once
entered
in Ms Access form field. what must i put in macro, your help will be
greatly
appreciated,

I would like the data in that field to be locked once record is saved,
Thanks




.



Relevant Pages