Welcome to SPN

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

Sign Up Now!

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!
     

Share This Page