Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2004
    Posts
    3

    Unanswered: If field is NULL then change background colour

    I am trying to change the background colour of a field if it is null / missing. I can do this when the field is equal to certain criteria (eg if title='Mr' then backgound colour = blue) but I can't the coding right is the field is null/missing. Can anyone point me in the right direction?

  2. #2
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    PHP Code:
      IF IsNull(TitelThen
        yourTextField
    .BackColorvbBlue
      
    EndIf 
    ALSO

    IF IsNull(Titel) OR Titel="" Then
    yourTextField.BackColor= vbBlue
    EndIf

  3. #3
    Join Date
    Aug 2004
    Posts
    3
    Thanks hammbakka, I had something similar but was just using color names instead of the vbcolor (fairly new to vb coding).
    thanks again.

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Yes, you can use the RGB function to mix colors (Red, Green and Blue)

Posting Permissions

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