Welcome to SPN

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

Sign Up Now!
  1. Guest ji, please consider donating today!
      Become a Supporter    ::   Make a Contribution   
    Monthly Recurring Target: $300 :: Achieved: $95

VBA Beginner Needs Direction - Conditional Formatting

Discussion in 'Information Technology' started by Mark S via AccessMonster.com, Nov 4, 2005.

  1. Mark S via AccessMonster.com

    Guest

    I am trying to do conditional formatting on a main form/subform. The subform
    depends on the main form. If main form is x and main form is y then subform
    field is red if under x. Can this be accomplished using Expression/Field or
    should I venture into using VBA? I am totally new @ VBA.

    Any help is greatly appreciated.


    --
    Message posted via AccessMonster.com
    http://www.accessmonster.com/Uwe/Forums.aspx/access/200511/1
     
  2. Wayne Morgan

    Wayne Morgan
    Expand Collapse
    Guest

    Yes, this can be accomplished using Expression Is (you may even be able to
    use Field Value Is - Less Than) in the Conditional Formatting settings for
    the control. The trick is the syntax to refer to a control on the subform
    from the main form or to refer to a control on the main form from the
    subform.

    If the control you are wanting to use the conditional formatting on is on
    the subform, then to refer to the control on the main form the syntax you
    would use in the Conditional Formatting dialog would be:

    [Parent]![ControlName]

    --
    Wayne Morgan
    MS Access MVP


    "Mark S via AccessMonster.com" <u13137@uwe> wrote in message
    news:56d67481e2abe@uwe...
    >I am trying to do conditional formatting on a main form/subform. The
    >subform
    > depends on the main form. If main form is x and main form is y then
    > subform
    > field is red if under x. Can this be accomplished using Expression/Field
    > or
    > should I venture into using VBA? I am totally new @ VBA.
    >
    > Any help is greatly appreciated.
    >
    >
    > --
    > Message posted via AccessMonster.com
    > http://www.accessmonster.com/Uwe/Forums.aspx/access/200511/1
     
  3. Mark S via AccessMonster.com

    Guest

    Thanks Wayne....I'll give it a try.

    Wayne Morgan wrote:
    >Yes, this can be accomplished using Expression Is (you may even be able to
    >use Field Value Is - Less Than) in the Conditional Formatting settings for
    >the control. The trick is the syntax to refer to a control on the subform
    >from the main form or to refer to a control on the main form from the
    >subform.
    >
    >If the control you are wanting to use the conditional formatting on is on
    >the subform, then to refer to the control on the main form the syntax you
    >would use in the Conditional Formatting dialog would be:
    >
    >[Parent]![ControlName]
    >
    >>I am trying to do conditional formatting on a main form/subform. The
    >>subform

    >[quoted text clipped - 5 lines]
    >>
    >> Any help is greatly appreciated.



    --
    Message posted via AccessMonster.com
    http://www.accessmonster.com/Uwe/Forums.aspx/access/200511/1
     
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