Link to home
Start Free TrialLog in
Avatar of Sharon
SharonFlag for United States of America

asked on

Lock the first record

On a data entry form, some of the users are accidently changing data in the first record.  What is the code that would lock the form for the first record?  I guess I would add a button that would unlock the first record if it needed to be edited.  What would be the code for that?  Thanks!
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Why just lock the first record...?
This will not stop them from editing other records as well...

You can lock the entire form with code like this:
Me.AllowEdits=False

You may also wish to prevent record deletes
Me.AllowDeletions=False

But perhaps you can explain for needing this for the first record only...?
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
<But perhaps you can explain for needing this for the first record only...? >

...also remember that if the form is re-sorted, the "first" record will change