Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!
  1.   Become a Supporter    ::   Make a Contribution   
    Target (Recurring Monthly): $200 :: Achieved: $95

conditional formating

Discussion in 'Information Technology' started by Levans digital, Jul 28, 2006.

  1. Levans digital

    Levans digital
    Expand Collapse
    Guest

    Hey MVPs

    I have a Field "WB-Balance"
    I have a second field "Quantity" which is the field I want to apply
    conditional formating to.

    In the conditional formating window I choose expression is and I type the
    following expression IIF(([WB_Balance])="0"}

    This is the first time I am dealing with conditional formating I really dont
    knowing anything

    I want the "Quantity" field to be unavailable if the "WB_Balance" field has
    a value of Zero can that work???

    Help!
     
  2. Loading...

    Similar Threads Forum Date
    Inspirational Unconditional love for the Guru Videos Sep 4, 2010
    General Unconditional Love Hard Talk Jun 28, 2008
    Pure and Unconditional Love for God Gurmat Vichaar Feb 18, 2008

  3. jleckrone@hotmail.com

    jleckrone@hotmail.com
    Expand Collapse
    Guest

    Your IIF Statement is another way of writing and IF..THEN..ELSE
    statement.
    IF <condition> is True Then
    Do This
    ELSE
    Do This
    End IF

    IIF is the same way. IIF(<Condition>, Do this if True, Do this if
    False)

    I think what you are going to want in this example is an IF..Then..Else

    If Me.[WB_Balance] = 0 Then
    Me.Quantity.Enabled = False
    Else
    Me.Quantity.Enabled = True
    End IF

    I'd put this statement in the On Current event of your form.

    Hope that helps!
     
  4. Michael H

    Michael H
    Expand Collapse
    Guest

    Hi.

    Is Quantity a text field? If not, there shouldn't be any quotes around the
    zero.

    Try this: IIF(([WB_Balance])=0,True,False)

    And, make sure that the Enabled toggle button in the Conditional Formatting
    box is set to Disabled.

    If Quantity really is a text field, then use this instead:
    IIF(([WB_Balance])="0",True,False)

    -Michael


    "Levans digital" wrote:

    > Hey MVPs
    >
    > I have a Field "WB-Balance"
    > I have a second field "Quantity" which is the field I want to apply
    > conditional formating to.
    >
    > In the conditional formating window I choose expression is and I type the
    > following expression IIF(([WB_Balance])="0"}
    >
    > This is the first time I am dealing with conditional formating I really dont
    > knowing anything
    >
    > I want the "Quantity" field to be unavailable if the "WB_Balance" field has
    > a value of Zero can that work???
    >
    > Help!
     
  5. Michael H

    Michael H
    Expand Collapse
    Guest

    I'd actually prefer to use the On Current event as well. Here's an even
    shorter bit of (air) code for using that method:
    Me.Quantity.Enabled = Not(Me.[WB_Balance] = 0)

    -Michael



    "jleckrone@hotmail.com" wrote:

    > Your IIF Statement is another way of writing and IF..THEN..ELSE
    > statement.
    > IF <condition> is True Then
    > Do This
    > ELSE
    > Do This
    > End IF
    >
    > IIF is the same way. IIF(<Condition>, Do this if True, Do this if
    > False)
    >
    > I think what you are going to want in this example is an IF..Then..Else
    >
    > If Me.[WB_Balance] = 0 Then
    > Me.Quantity.Enabled = False
    > Else
    > Me.Quantity.Enabled = True
    > End IF
    >
    > I'd put this statement in the On Current event of your form.
    >
    > Hope that helps!
    >
    >
     
  6. Steve Schapel

    Steve Schapel
    Expand Collapse
    Guest

    Levans,

    You're making it more complicated than it needs to be. Just enter it
    like this...
    [WB_Balance]=0

    --
    Steve Schapel, Microsoft Access MVP

    Levans digital wrote:
    > Hey MVPs
    >
    > I have a Field "WB-Balance"
    > I have a second field "Quantity" which is the field I want to apply
    > conditional formating to.
    >
    > In the conditional formating window I choose expression is and I type the
    > following expression IIF(([WB_Balance])="0"}
    >
    > This is the first time I am dealing with conditional formating I really dont
    > knowing anything
    >
    > I want the "Quantity" field to be unavailable if the "WB_Balance" field has
    > a value of Zero can that work???
    >
    > Help!
     
Since you're here... we have a small favor to ask...

More people are visiting & reading SPN than ever but far fewer are paying to sustain it. Advertising revenues across the online media have fallen fast. So you can see why we need to ask for your help. Donating to SPN's is vote for free speech, for diversity of opinions, for the right of the people to stand up to religious bigotry. Without any affiliation to any organization, this constant struggle takes a lot of hard work to sustain as we entirely depend on the contributions of our esteemed writers/readers. We do it because we believe our perspective matters – because it might well be your perspective, too... Fund our efforts and together we can keep the world informed about the real Sikh Sikhi Sikhism. If everyone who writes or reads our content, who likes it, helps us to pay for it, our future would be much more secure. Every Contribution Matters, Contribute Generously!

    Become a Supporter      ::     Make a Contribution     



Share This Page