?
Solved

MS Access 2010 lock record in form

Posted on 2013-05-10
2
Medium Priority
?
1,063 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 2000 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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
Suggested Courses

764 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