X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Can I Lock The Table, Access 2010    
post Nov 20 2019, 05:59 PM

Posts: 247
Joined: 30-November 10


Can I lock the table in the database. Once I have defined the table, I don't want user to change it in any way.

Go to the top of the page
post Nov 20 2019, 06:00 PM

UA Moderator
Posts: 77,704
Joined: 19-June 07
From: SunnySandyEggo

Not in Access, I don't think so. Why?

Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
post Nov 20 2019, 06:07 PM

UtterAccess VIP
Posts: 2,230
Joined: 4-June 18
From: Somerset, UK

Actually it is possible but its not easy to do as it involves changes to a system table
However there should be no reason to do so as end users should never have direct access to tables or queries.

If you want to prevent changes to the table design, suggest you hide the table and the navigation pane.
Or split the database so the table is in an encrypted backend file.
Or you can open the entire database read only

To prevent data changes, there are several approaches
1. Create a query SELECT DISTINCT * FROM TableName and use that as the record source for a form
2. Use the table as your form's record source and set Allow Edits, Allow Deletions, Allow Additions all false
3. Use your table as the record source for a subform and lock the subform

Colin (Mendip Data Systems)
Website, email
Go to the top of the page
post Nov 20 2019, 06:55 PM

UA Admin
Posts: 36,963
Joined: 20-June 02
From: Newcastle, WA

Please clarify. We assume that you mean you want to lock the records in the table so none of the values can be changed. However, "I don't want user to change it in any way" could mean that you don't want the table structure to be changeable.

My Real Name Is George. Grover Park Consulting is where I did business for 20 years.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page

Custom Search

RSSSearch   Top   Lo-Fi    28th March 2020 - 04:17 PM