Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Lock a Field with Data in it
Michael Jones 
    
6 years ago
I want to be able to lock a field after data has been entered so no one can change it. I still need to enter Data in that field for new records, Is there a way to do this.
Richard Rost  @Reply  
          
6 years ago
I would suggest an OnGotFocus event and the Locked property. You can say something like:

If IsNull(FieldName) Then
   FieldName.Locked = TRUE
Else
   FieldName.Locked = FALSE
End If

When the field gets focus, it will be either locked or unlocked based on whether or not is has data. You'll have to come up with a way around this for Admins who need to be able to edit the value, or just go right to the table.

You can also do a similar trick with entire records in the OnCurrent event.

I've covered these concepts in my classes, but this would make a neat TechHelp video. I'll add it to the list.
Michael Jones OP  @Reply  
    
6 years ago
Thank you I will try it and hope it works, I will keep a look out for your TechHelp video

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/6/2026 11:35:40 AM. PLT: 1s