How do I make a "conditional Format" on a record in a subform

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Allan Koch

    How do I make a "conditional Format" on a record in a subform

    Dear NG,

    I would like to format a record in a subform, dependent on a value in one
    field.
    If one field in the record I show in a subform (datasheet view) is true I
    like to view that particular row in green, all other rows just as they are
    normal. Is that possible ?

    regards
    Allan





  • Fletcher Arnold

    #2
    Re: How do I make a "condition al Format" on a record in a subform

    "Allan Koch" <allan@koch.d k> wrote in message
    news:40158fb3$0 $27409$edfadb0f @dread16.news.t ele.dk...[color=blue]
    > Dear NG,
    >
    > I would like to format a record in a subform, dependent on a value in one
    > field.
    > If one field in the record I show in a subform (datasheet view) is true I
    > like to view that particular row in green, all other rows just as they are
    > normal. Is that possible ?
    >
    > regards
    > Allan[/color]

    Of course a record doesn't have any colour - it is the controls (the
    textboxes, etc) on the form which can have a colour. With Access 2k onwards
    you can simply use conditional formatting.

    Open the subform in design view and highlight the textboxes you wish to
    change colour. From the Format menu select Conditional Formatting and enter
    an expression such as "MyField=10 " and select the colour.


    Fletcher


    Comment

    • Allan Koch

      #3
      Re: How do I make a &quot;condition al Format&quot; on a record in a subform

      Hi Fletcher,

      Thanks !
      Yes I know a record doesn't have a colour.
      I used your advise, the only thing is that I am not able to have the hole
      line formatted in one solid colour because check box fields do not have the
      "conditiona l format" available. Do you think there is a cure for that ? ( I
      want it to look like, you have selected the hole record row, just in a
      different colour than black)
      regards
      allan
      "Fletcher Arnold" <fletch@home.co m> wrote in message
      news:bv4621$ons $1@hercules.bti nternet.com...[color=blue]
      > "Allan Koch" <allan@koch.d k> wrote in message
      > news:40158fb3$0 $27409$edfadb0f @dread16.news.t ele.dk...[color=green]
      > > Dear NG,
      > >
      > > I would like to format a record in a subform, dependent on a value in[/color][/color]
      one[color=blue][color=green]
      > > field.
      > > If one field in the record I show in a subform (datasheet view) is true[/color][/color]
      I[color=blue][color=green]
      > > like to view that particular row in green, all other rows just as they[/color][/color]
      are[color=blue][color=green]
      > > normal. Is that possible ?
      > >
      > > regards
      > > Allan[/color]
      >
      > Of course a record doesn't have any colour - it is the controls (the
      > textboxes, etc) on the form which can have a colour. With Access 2k[/color]
      onwards[color=blue]
      > you can simply use conditional formatting.
      >
      > Open the subform in design view and highlight the textboxes you wish to
      > change colour. From the Format menu select Conditional Formatting and[/color]
      enter[color=blue]
      > an expression such as "MyField=10 " and select the colour.
      >
      >
      > Fletcher
      >
      >[/color]


      Comment

      • Fletcher Arnold

        #4
        Re: How do I make a &quot;condition al Format&quot; on a record in a subform

        "Allan Koch" <allan@koch.d k> wrote in message
        news:4016cff7$0 $27369$edfadb0f @dread16.news.t ele.dk...[color=blue]
        > Hi Fletcher,
        >
        > Thanks !
        > Yes I know a record doesn't have a colour.
        > I used your advise, the only thing is that I am not able to have the hole
        > line formatted in one solid colour because check box fields do not have[/color]
        the[color=blue]
        > "conditiona l format" available. Do you think there is a cure for that ?[/color]
        ( I[color=blue]
        > want it to look like, you have selected the hole record row, just in a
        > different colour than black)
        > regards
        > allan[/color]


        Hi Allan
        If you have your subform in datasheet view, then you probably have the least
        flexibility in what it looks like. If you used the continuous forms view
        then other possibilities are opened up such as placing shapes or many
        transparent textboxes placed on one coloured one. However, on balance, I
        still prefer the datasheet view for subforms and I would probably not use a
        check box.
        I would define a field in my query such as:
        IIf([MyField]=1,"X",Null) AS TrueOrFalse
        So that I could use a textbox to display an "X" rather than use a checkbox.
        Of course, you then have to write code to allow updating. Perhaps someone
        else might have an imaginative suggestion and Stephen Lebans is a likely
        candidate - you could try his website at


        Fletcher


        Comment

        • Allan Koch

          #5
          Re: How do I make a &quot;condition al Format&quot; on a record in a subform

          Hi Fletcher,
          Very useful information.
          An other question, a little related.
          My subform contain a lot of fields, and I really would like to keep the
          first column locked, meaning it will stay in pos. 1 when I scroll sideways
          with the other fields. Is that possible ?
          Regards
          Allan
          "Fletcher Arnold" <fletch@home.co m> wrote in message
          news:bv6v88$f8r $1@sparta.btint ernet.com...[color=blue]
          > "Allan Koch" <allan@koch.d k> wrote in message
          > news:4016cff7$0 $27369$edfadb0f @dread16.news.t ele.dk...[color=green]
          > > Hi Fletcher,
          > >
          > > Thanks !
          > > Yes I know a record doesn't have a colour.
          > > I used your advise, the only thing is that I am not able to have the[/color][/color]
          hole[color=blue][color=green]
          > > line formatted in one solid colour because check box fields do not have[/color]
          > the[color=green]
          > > "conditiona l format" available. Do you think there is a cure for that ?[/color]
          > ( I[color=green]
          > > want it to look like, you have selected the hole record row, just in a
          > > different colour than black)
          > > regards
          > > allan[/color]
          >
          >
          > Hi Allan
          > If you have your subform in datasheet view, then you probably have the[/color]
          least[color=blue]
          > flexibility in what it looks like. If you used the continuous forms view
          > then other possibilities are opened up such as placing shapes or many
          > transparent textboxes placed on one coloured one. However, on balance, I
          > still prefer the datasheet view for subforms and I would probably not use[/color]
          a[color=blue]
          > check box.
          > I would define a field in my query such as:
          > IIf([MyField]=1,"X",Null) AS TrueOrFalse
          > So that I could use a textbox to display an "X" rather than use a[/color]
          checkbox.[color=blue]
          > Of course, you then have to write code to allow updating. Perhaps someone
          > else might have an imaginative suggestion and Stephen Lebans is a likely
          > candidate - you could try his website at
          > http://www.lebans.com/
          >
          > Fletcher
          >
          >[/color]


          Comment

          • Fletcher Arnold

            #6
            Re: How do I make a &quot;condition al Format&quot; on a record in a subform

            "Allan Koch" <allan@koch.d k> wrote in message
            news:40182fa5$0 $27451$edfadb0f @dread16.news.t ele.dk...[color=blue]
            > Hi Fletcher,
            > Very useful information.
            > An other question, a little related.
            > My subform contain a lot of fields, and I really would like to keep the
            > first column locked, meaning it will stay in pos. 1 when I scroll sideways
            > with the other fields. Is that possible ?
            > Regards
            > Allan[/color]


            Sure - this is very easy. Highlight the column in datasheet view and from
            the Format menu select Freeze Columns.


            Fletcher


            Comment

            • Allan Koch

              #7
              Re: How do I make a &quot;condition al Format&quot; on a record in a subform

              Great, Thanks again.
              I was looking in Format at the Top menubar :-(
              Regards
              Allan
              "Fletcher Arnold" <fletch@home.co m> wrote in message
              news:bv9bnd$e49 $1@hercules.bti nternet.com...[color=blue]
              > "Allan Koch" <allan@koch.d k> wrote in message
              > news:40182fa5$0 $27451$edfadb0f @dread16.news.t ele.dk...[color=green]
              > > Hi Fletcher,
              > > Very useful information.
              > > An other question, a little related.
              > > My subform contain a lot of fields, and I really would like to keep the
              > > first column locked, meaning it will stay in pos. 1 when I scroll[/color][/color]
              sideways[color=blue][color=green]
              > > with the other fields. Is that possible ?
              > > Regards
              > > Allan[/color]
              >
              >
              > Sure - this is very easy. Highlight the column in datasheet view and from
              > the Format menu select Freeze Columns.
              >
              >
              > Fletcher
              >
              >[/color]


              Comment

              Working...