Protect older data

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Please,
i have a continuos form and one Check Box.
How to protect all data in this form older of one day for edit or delete if
Check Box is Yes. When is Check Box No, this data must be free to change.

In this continuous form i have in first column dates sorted and after more
columns with numbers...
 
I think your best bet is to use the OnCurrent event to evaluate the date.
After selecting a record, the OnCurrent will do something like:

If Me.DateField <= Date()-1 Then
Me.AllowEdits=False
Else
Me.AllowEdits=True
Endif

HTH,
Barry
 
Thank you, this is OK but must be an option with Check Box to control this
protection like I describe before. If Check = Yes protection is enabled, and
if Check = No protection is disabled and data is free to edit. Have you idea?
 
If Me.chkEditOk Then
Me.AllowEdits=True
Me.AllowDeletions=True
Else
If Me.DateField <= Date()-1 Then
Me.AllowEdits=False
Me.AllowDeletions=False
Else
Me.AllowEdits=True
Me.AllowDeletions=True
End If
End If
 
Back
Top