Solved

MS Access 2010 lock record in form

Posted on 2013-05-10
2
1,003 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Introduction When developing Access applications, often we need to know whether an object exists.  This article presents a quick and reliable routine to determine if an object exists without that object being opened. If you wanted to inspect/ite…
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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.

806 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