Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2008
    Posts
    27

    Unanswered: Change Visibility Based on value of field

    Hi there
    I am using a query to open a form. One of the fields on the form is "Stock".

    Basically if the value of stock is "0" i want to display an image with a cross, if the value is one or more, i want to display a different image.

    Please could someone point me in the right direction for achieving this?!

    Thanks v much in advance!
    adam

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Code:
    If Me.Stock = 0 Then
       imgCross.Visible = True
       imgOther.Visible = False
    Else
       imgCross.Visible = False
       imgOther.Visible = True
    End If
    You could put that in your form's On Current event procedure... or in After Update for your Stock field and call it from On Current.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

  3. #3
    Join Date
    Aug 2008
    Posts
    27
    many thanks StarTrekker - works a treat :-)

  4. #4
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Happy to help
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •