Re: Enable/Disable the field in continous form conditionally
by "paii, Ron" <none@[EMAIL PROTECTED]
>
May 8, 2008 at 12:33 PM
"Naushad" <nhaider@[EMAIL PROTECTED]
> wrote in message
news:d891295b-f08f-4d08-911a-f53c6bdafb72@[EMAIL PROTECTED]
> Hi all,
>
> I am using the countinous form. I want to Enable/Disable the some
> fields for perticular records as per the following condition when
> open the form. I have written this code in "On Current Event". I go on
> the perticular record its enable/dosable the following field for all
> records. I have tried this code in "On Open Even" but there is no
> effect.
>
> Please help me to solve this problem.
>
> Private Sub Form_Current()
> If (Me.Grade = 9 Or Me.Grade = 10 Or Me.Grade = 11 Or Me.Grade = 12 Or
> Me.Grade = 13 _
> Or Me.Grade = 14 Or Me.Grade = 15) And Me.TotDay <= 40 Then
>
> Me.ManagerApproval.Enable= False
> Me.ManagerConfirmation.Enable= False
> Else
> Me.ManagerApproval.Enable= True
> Me.ManagerConfirmation.Enable= True
> End If
> End Sub
>
> thanks in advance.
I have always used the ! when referencing a control on a form.
Me![Grade]
Me![TotDay]
Me![ManagerApproval].Enable