Solved

MS Access 2010 lock record in form

Posted on 2013-05-10
2
1,030 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s been over a month into 2017, and there is already a sophisticated Gmail phishing email making it rounds. New techniques and tactics, have given hackers a way to authentically impersonate your contacts.How it Works The attack works by targeti…
This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

730 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