Lock field in subform ? how is this working ?

fibayne

Registered User.
Local time
Today, 11:37
Joined
Feb 6, 2005
Messages
236
:confused:
Hi.. I have been looking thru the forum for a while for a way to change the back colour of a field [FeeNotCollectable] in a subform (continuous) and came across Conditional Formatting using this have set
[FeeNotCollectable] with 'ExpressionIs [FNCDate]>Date()' back color turns grey, and set [FNCDate] to 'FieldValueIs Less than Date()' font turns red
which seems far simpler than what I had been trying and failing to do..

I also wanted to lock the field once the date [FNCDate] had gone past today and found the following code..together they seem to be working but I cant really work out why :confused:

Private Sub FeeNotCollectable_AfterUpdate()
Me![FeeNotCollectable].Enabled = True
End Sub

Private Sub Form_Current()
DoCmd.Maximize
Me![FeeNotCollectable].Enabled = False
End Sub

If I change the Cond. format on FeeNotCollectable to 'ExpressionIs [FNCDate]<Date()' it disables all records where the date is today and greater and enables all before today ?? if anyone can see how this is working I would be really interested as it is a fairly common topic and this seems to be a fairly simply way to get it to work ...cheers Fi
 

Users who are viewing this thread

Back
Top Bottom