Lock a field after user enters name?

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

Guest

I have a form with a field for the user to choose his/her name from a combo
box. What I'm trying to get to is that once the form has been entered and
saved I would like that one field to be locked so the field cannot be
changed. Any help would be appreciated.

Thanks
Joe
 
Why do you want to lock the field?

You could close the form and do not display this field in your forms.
 
Allan,

I want to lock the field so that another user could not change who entered
the original information.

You also write that after the form is closed I could choose not to have that
field appear when the form is opened again? If I have that right, I would
appreciate help in getting ithere.

Thanlks
Joe
 
You also write that after the form is closed I could choose not to have that
field appear when the form is opened again? If I have that right, I would
appreciate help in getting ithere.

You can use code in the Form's Current event:

Private Sub Form_Current()
Me!namecontrol.Enabled = Me.NewRecord
End Sub

If the form is at the new record, the control will be enabled; if not,
it won't.

You should make the name field Required in the table definition;
otherwise a user could start a record, leave it blank, move off it,
and then never be able to enter it.

Again, note that you MUST enable Access security (not trivial!) and
ensure that the users can interact with this table *only* using your
form.

John W. Vinson[MVP]
 
You mentioned security and I did have an additional question. Is it possible
to password protect the tables?

Thanks again

Joe
 
You mentioned security and I did have an additional question. Is it possible
to password protect the tables?

Access Security can do so. Download the Security Whitepaper from
Microsoft's website.

Read it carefully.

Sleep on it.

Read it carefully, AGAIN.

Follow its instructions carefully.

It will let you create Users and User Groups, and assign privileges to
each user and each group to permit or prohibit either design changes,
data changes, or even simple viewing of any Access object. Each User
gets a password.

It's a complex subject hence the cautions above; it's not uncommon to
have security implemented incorrectly, making it inconvenient while
leaving the database wide open to any knowledgable user - or even to
lock it up so that NOBODY can get into it.

John W. Vinson[MVP]
 
Back
Top