Results 1 to 3 of 3

Thread: [RESOLVED] if statement >=

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2006
    Location
    Greater Manchester, UK
    Posts
    476

    Resolved [RESOLVED] if statement >=

    This is my code at the moment
    Code:
    Form Load()
    Text1.Text = GetSetting "app1","reg","name", ""
    XpBs1.Value = True
    If Text2.Text = GetSetting "app1","reg","PID", "" Then
    
    ' quite abit of code
    
    Else
    MsgBox "Incorrect registration details"
    End If
    is it possible to reverse the if statement so it would be like this

    Code:
    If Text2.Text DOES NOT EQUAL GetSetting "app1","reg","PID", "" Then
    MsgBox "Incorrect registration details"
    Else
    
    ' quite abit of code
    
    End If
    Thanks in advance
    chris1990
    If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.

    If you fail, try and try again, its the only way to success.

  2. #2
    Fanatic Member drivenbywhat's Avatar
    Join Date
    Jan 2007
    Location
    VA - USA
    Posts
    866

    Re: if statement >=

    Yes, if you want to check that "it doesn't equal" something, then you put "<>" in its place.

    If Text2.Text <> GetSetting "app1","reg","PID", "" Then

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2006
    Location
    Greater Manchester, UK
    Posts
    476

    Re: if statement >=

    thanks
    If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.

    If you fail, try and try again, its the only way to success.

Posting Permissions

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



Click Here to Expand Forum to Full Width