lock/Unlock data for editing from the back end (1 Viewer)

Reichel

New member
Local time
Today, 08:22
Joined
Nov 5, 2017
Messages
6
Hello,

I have a database that is split to a frontend and a backend, the front end was distributed to users. I am wondering if there is a way to lock data editing in the tables in the back end so it stops the end users from being able to edit the data but still be able to view it.

Some background:

The database is to create employee development plans (a form) and quarterly track the progress throughout the year. I want the form to have a field for development area enabled for editing in January only, q1 progress field enabled until April 1st... and so on.
 

isladogs

MVP / VIP
Local time
Today, 06:22
Joined
Jan 14, 2017
Messages
18,216
Don't give users access to the tables.
You can write code in your form(s) that will control locking of various fields depending on current date.
However if the user changes the date on their pc, the data will be editable.

If none of the data should be editable you can make your form read only
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:22
Joined
May 7, 2009
Messages
19,233
Use the forms load event to lock/unlock those fields.

Private sub form_load()
Me.textbox1.locked=(format(date,"mmm")<>"jan"))
Me.q1.locked=(format(date,"q") & ""<>"1")
Me.q2.locked=(format(date,"q") & ""<>"2")
Me.q3.locked=(format(date,"q") & ""<>"3")
Me.q4.locked=(format(date,"q") & ""<>"4")
End sub
 

Users who are viewing this thread

Top Bottom