
Originally Posted by
ranman256
in the form ON CURRENT event
lock the form from edits if the date is wrong:
Private Sub Form_Current()
Me.AllowEdits = txtDateFld = date()
end sub
I've tried this and it won't work, as soon as I enter the form view it shows me the error.
use conditional formatting for the controls you want to lock. This will lock controls on all records over 5 days old
expression is....[Datum]<date()-5
me.allowedits=[Datum]>=date()-5
The conditional formatting works, but the second part of your answer isn't.
I have typed that expression into "On current" in my form and nothing happens after that, I can still edit everything.