How to display a note in Txtbox2 depending on the result in Txtbox1 in Access report?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JacD
    New Member
    • Nov 2008
    • 7

    How to display a note in Txtbox2 depending on the result in Txtbox1 in Access report?

    I have a report in MS Access which shows Base Types in a textbox. Depending on the result in that textbox, I want another textbox to show a word.

    eg. Base types are in a text box named BaseType
    The word I want to add should show in text box named NonDev

    If the result of BaseType textbox is ASN then show Non-Devolved in the NonDev textbox. Any other result in BaseType textbox should leave the NonDev textbox blank.

    Any help appreciated.

    Thanks
    JacD
  • yarbrough40
    Contributor
    • Jun 2009
    • 320

    #2
    Is this what you're after?

    Code:
    if BaseType.Value <> "ASN" Then
    NonDev.Value =  ""
    Else
    NonDev.Value =  "Non-Devolved"
    End If

    Comment

    • JacD
      New Member
      • Nov 2008
      • 7

      #3
      Many thanks Yarbrough40,
      I'm a beginner in this kind of thing.
      That's exactly what I needed, just the other way round ASN = non-devolved
      Your a star, cheers
      Jac

      Comment

      • yarbrough40
        Contributor
        • Jun 2009
        • 320

        #4
        hey not a problem. By the way I think you're going to find that the way I have it here IS the way you want it based on your requirement :

        "If the result of BaseType textbox is ASN then show Non-Devolved in the NonDev textbox. Any other result in BaseType textbox should leave the NonDev textbox blank."

        at first it looks a little weird but it is correct. Also since you're using Access I believe you may need the "Me" designation for your controls e.g. "Me.NonDev.Valu e"

        Comment

        Working...