Hi,
I have two date fields on my form, for when a particular process is suspended and then unsuspended. Some processes will never be suspended, so in these cases I want to disable accidental input to the Unsuspended field.
I thought I could do it like this
but that gives me Run-time Error 424 Object required. This code is on the OnCurrent event by the way. I plan to have similar code on the AfterUpdate event of the Suspension field.
If I use = Null rather than Is Null then I don't get an error message, but it doesn't actually work, i.e. the Unsuspension field is enabled even if the Suspension field hasn't been completed.
I read something somewhere about a date never really being null, so I tried =0 Again, no error, but the disabling doesn't work.
Where am I going wrong here? In case it's relevant, the fields are on a form called "frm01Study" on TabCtl41 (which I never renamed) on a page called pgGlobal which is the second of three tabs.
Thanks,
Pat.
I have two date fields on my form, for when a particular process is suspended and then unsuspended. Some processes will never be suspended, so in these cases I want to disable accidental input to the Unsuspended field.
I thought I could do it like this
Code:
If Me.Study_wide_suspension.Value Is Null Then
Me.Study_wide_Unsuspension.Enabled = False
Else
Me.Study_wide_Unsuspension.Enabled = True
End If
but that gives me Run-time Error 424 Object required. This code is on the OnCurrent event by the way. I plan to have similar code on the AfterUpdate event of the Suspension field.
If I use = Null rather than Is Null then I don't get an error message, but it doesn't actually work, i.e. the Unsuspension field is enabled even if the Suspension field hasn't been completed.
I read something somewhere about a date never really being null, so I tried =0 Again, no error, but the disabling doesn't work.
Where am I going wrong here? In case it's relevant, the fields are on a form called "frm01Study" on TabCtl41 (which I never renamed) on a page called pgGlobal which is the second of three tabs.
Thanks,
Pat.