Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > Re: Enable/Disa...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 30194 of 31596
Post > Topic >>

Re: Enable/Disable the field in continous form conditionally

by Marshall Barton <marshbarton@[EMAIL PROTECTED] > May 8, 2008 at 01:02 PM

Naushad wrote:
>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


It might be better to use Conditional Formatting (View menu)
on the controls you want to disable.

Use the Expression Is:  option with an expression like:

[Grade] >= 9 And [Grade <= 15] And [TotDay] <= 40

--
Marsh
 




 3 Posts in Topic:
Enable/Disable the field in continous form conditionally
Naushad <nhaider@[EMAI  2008-05-08 05:07:36 
Re: Enable/Disable the field in continous form conditionally
"paii, Ron" <  2008-05-08 12:33:08 
Re: Enable/Disable the field in continous form conditionally
Marshall Barton <marsh  2008-05-08 13:02:35 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Fri Dec 5 11:32:59 CST 2008.