Solved Locking Certain fields (1 Viewer)

majid.pervaiz

Registered User.
Local time
Today, 08:00
Joined
Oct 15, 2012
Messages
110
Dear All,

Appreciate your expert guidance please, probably it is very simple but I am making a silly mistake.

I have 3 dates on a form (Last Review Date, Next Review Date, and Start Review Date).

Last Review Date let's assume today (i.e. 18/08/2022)
Next Review Date is "Last Review Date" + 3 years (i.e 18/08/2025)
Start Review Date is 2 months prior to the Next Review Date (i.e. 18/06/2025)

What I need is that every time the Last Review Date should be locked but once it crosses Start Review Date then only it should be enabled for change.

What I did is that I created a variable where I store the current date and compare it with the Start Review Date and put it on the Form Current event.

If Dte >= me.StartReviewDate.value then
me.LastReviewDate.enabled = True
End if

The above actually triggers and the field is unlocked but it unlocks all other records also which I don't want. I want only that one particular record to be unlocked and the rest of the records (date of the last review) should remain locked.

Appreciate your guidance on priority basis please.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 13:00
Joined
May 7, 2009
Messages
19,247
with your explanation i would think your form is continuous?
if so you can use Conditional format to Enable/Disable the LastReviewDate.
cf.png
 

majid.pervaiz

Registered User.
Local time
Today, 08:00
Joined
Oct 15, 2012
Messages
110
yes, the form has a split and it has rows like excel.
Can you please explain to me in detail how to set up conditional formatting?
 

majid.pervaiz

Registered User.
Local time
Today, 08:00
Joined
Oct 15, 2012
Messages
110
Yes conditional formatting worked... I never knew this.

Thank you soooo much
 

Users who are viewing this thread

Top Bottom