Solved

MS Access 2010 lock record in form

Posted on 2013-05-10
2
975 Views
Last Modified: 2013-05-21
Hello,

I have an Access form where I want to lock the last record to keep people from editing it, but the other records are ok to edit.  Is that possible?

Thanks, Joel
0
Comment
Question by:Genius123
2 Comments
 
LVL 19

Accepted Solution

by:
Eric Sherman earned 500 total points
ID: 39156629
If this is a continuous form, probably not.  You could change the Recordset to Snapshot but that would apply to all records.

If you are using a single record display then you could try something like test for the max record id and if it's the last one then lock all fields on your form.

Just an idea.

ET
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 39163596
Remember that a table really does not have a "last" record.
A table can be sorted in any order, so the "last" record can change.

If you mean the most "recent" record, then you can add a "created date" field to your table and add in the current date time.
The sort a query of this table by this date field, ...then do as etsherman suggests above...
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now