Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Math (AXP/Win 2K)

    I am setting a text box backcolor based on the value in the field. The one that I can't get to work is where the value is between two numbers. For instance I need the backcolor to be yellow if the values are between 70 and 85. How do you make a statement that will do this. I have (and it doesn't work):

    ElseIf Me.Text35.Value < 85 > 70 Then
    Me.Text35.BackColor = 65535

    Thanks,
    Mark

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Math (AXP/Win 2K)

    Change the condition to

    ElseIf Me.Text35.Value < 85 And Me.Text35.Value > 70 Then

    Regards,
    Hans

  3. #3
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Maidstone, Kent, England
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Math (AXP/Win 2K)

    ElseIf Me.Text35.Value > 70 And Me.Text35.Value < 85 Then
    Me.Text35.BackColor = 65535

    I think <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    Peter

  4. #4
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    USA
    Posts
    379
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Math (AXP/Win 2K)

    Try a Select Case statement as in:

    <pre>Select Case your field
    Case 71 To 84
    yellow color statement
    Case .... your other value
    other color statement
    Case Else
    else color statement
    End Select</pre>


Posting Permissions

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