Macro to

  • Thread starter Thread starter Banda
  • Start date Start date
B

Banda

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,
 
At what point should the data be "locked"? Right after the user has entered
the data and is still in the control? After the user leaves the control?
After the user has saved the record in which the data were entered?
 
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
 
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
 
Or, using an ACCESS macro that is attached to the form's OnCurrent property:

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