Field lock

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I wanted to have a field save and lock the data inputed so that it can not be
changed once exiting that field. Can someone tell me how to do this...I am
new to access.
 
Do a search for previous post. "locking records" is addressed pretty often.
 
I don't think Rick understood the question - or I don't. It has to do with
terminology. A field is part of a table. Forms do not have fields. The do
have controls that may be bound to fields in a table.
What I think you are asking is in regard to a form. If so, then in the
after update event of the control that you want prevent changing of the data :

Me.MyControlName.Locked = True

Now, the data will display, but can't be changed. What you did not say is
what happens after that. The next time the record is selected, can it be
changed then?
If so, then in the form's current event you would use the same line above
changin True to False.

Then, of course, when you create a new record, you would have to set the
Locked property back to False.

If it is the case where once the data has been entered it can never be
changed, then then in design mode, set the Locked property to True and only
Change it to False for a new record and then change it back to True after you
have updated the control with the data.
 
Thank you Klatuu, your first instructions were exactly what I was looking for!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top