Insert, No Edit

D

Dorci

Access 2002: How can I allow editing of a particular field when a record is
first created, but not allow editing once the new record has been saved?
Thanks.
 
M

MacDermott

You can use the form's OnCurrent event procedure to run code like this:
If Me.NewRecord Then
MyField.Locked=False
Else
MyField.Locked=True
End If
 
M

Marshall Barton

Dorci said:
Access 2002: How can I allow editing of a particular field when a record is
first created, but not allow editing once the new record has been saved?


How do you know that users will NEVER make a mistake
entering the field's value??

Use the form's Current event:

Me.controlname.Locked = Not Me.NewRecord
 
D

Dorci

That worked. Thanks!
In the event the user makes a mistake entering the field's value, an
administrator can correct the value in the backend database. It's more
critical (and more likely) that the users do not accidentally change an
existing record's value as it is the key field. Thanks for the advice!
 

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

Top