How to change the colour of specific records in a field?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • neelsfer
    Contributor
    • Oct 2010
    • 547

    How to change the colour of specific records in a field?

    I have specific medicines in a table consisting of about 3000 records, that cause problems when its captured at stocktake every year.

    My question - can i change the colour of these spedific records to Blue, if one of the items are called up, in the stocktake capturing form.

    I presume that the Medicine table (Fis_ItemT) should have an extra field, and if that item appears in the Stocktake capturing form, then this extra field will tell the form to change the colour of that specific record to blue.
    - The form = stocktakeF
    - subform = Fis_StocktakeSF
    -Table where "item" field comes from = Fis_ItemT
    - Table where transaction record is kept in subform = Fis_StocktakeT
    - the field used to lookup "item" field in subform = "item_looku p" (numberfield)

    pls help.
  • hype261
    New Member
    • Apr 2010
    • 207

    #2
    You are pretty much there. I would add a boolean field to the table in question and then add it to your form.

    In the Forms current event I would write up a simple if statement looking at the value and then I would change the color of the Form.

    Comment

    • neelsfer
      Contributor
      • Oct 2010
      • 547

      #3
      Thx. this is where i get stuck. Can you perhaps give me an example of what code would look like pls

      Comment

      • hype261
        New Member
        • Apr 2010
        • 207

        #4
        Which part are you stuck on?

        The If statement or changing colors?

        Comment

        • neelsfer
          Contributor
          • Oct 2010
          • 547

          #5
          Got it right
          I added a field (NB) to the "Fis_itemT" table that contains all the medicines, and the value is = "1" for specific items.
          Then used conditional formatting [NB] = "1" and changed the colour in the "item_looku p" field.

          Comment

          Working...