Jump to content

Lock Records if creation date more than a month


Recommended Posts

In users' privilege set, select 'Custom privileges…' for Records access, then select 'limited…' for Edit privileges in the relevant table. Use a formula like:

Get ( CurrentDate ) - CreationDate < 30

as the calculation. Of course, you need to have a CreationDate field that auto-enters the creation date for this.

 

Edited by comment
  • Like 1
Link to post
Share on other sites
7 hours ago, comment said:

In users' privilege set, select 'Custom privileges…' for Records access, then select 'limited…' for Edit privileges in the relevant table. Use a formula like:


Get ( CurrentDate ) - CreationDate < 30

as the calculation. Of course, you need to have a CreationDate field that auto-enters the creation date for this.

 

IS this same formula can be applied with layoutenter script trigger ???

Link to post
Share on other sites
On 12/8/2019 at 5:49 PM, Ismail AlAbdulmohsen said:

how can I change the message that will come to user when he try to update an old record?

I don't know a really good way to do this. The best that I can think of is attach an OnLayoutKeystroke script trigger to the layout, with a script that does something like:

If [ Get ( AccountPrivilegeSetName ) = "Users" ] 
  Beep
  Show Custom Dialog [ "Your message" ]
  Exit Script [ Result: False ] 
End If

However, you will still get the standard access privilege error message if, for example, you drag and drop into a field.

 

Edited by comment
Link to post
Share on other sites
On 12/10/2019 at 1:54 AM, comment said:

I don't know a really good way to do this. The best that I can think of is attach an OnLayoutKeystroke script trigger to the layout, with a script that does something like:


If [ Get ( AccountPrivilegeSetName ) = "Users" ] 
  Beep
  Show Custom Dialog [ "Your message" ]
  Exit Script [ Result: False ] 
End If

However, you will still get the standard access privilege error message if, for example, you drag and drop into a field.

 

Hello; I'm using this function in the Access see attached, so how can I resolve it;

Error Message 1.PNG

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.