Partial AllowEdits

matt beamish

Registered User.
Local time
Today, 01:52
Joined
Sep 21, 2000
Messages
215
I want a subform to be editable if a date field on the form [created_date] is today's date. I want users to be able to edit that date field so that if they really need to, they can edit the fields on the form.

I have done some searching and found code to use on the "On Current" event of the subform.
I have used:
Code:
Private Sub Form_Current()

If Me.[created_date] = Date Then
    Me.AllowEdits = True

Else
    Me.AllowEdits = False
End If
End Sub

But this also prevents the date field from being edited, so can't be got round. Is there a way of removing the [Created_date] field from the process?

Thanks - learning, slowly.....

Matt
 
Got it with

Code:
Private Sub Form_Current()
If Me.[created_date] = Date Then
Me.Hand_made_Pot.Enabled = True
Else
Me.Hand_made_Pot.Enabled = False
End If
End Sub

Seek and you shall find
 

Users who are viewing this thread

Back
Top Bottom