Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2005
    Posts
    196

    Unanswered: placing an Or in an If statement

    is it possible to add an 'Or' syntax to an if statement? For example, this is how I would have guessed:

    Code:
    if txtbox.value="new" or "Existing then
            txtbox2.text = "This is a new or existing product"
    End if
    many thanks.

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    You've got to be kidding me ...

    If (TextBox.Value="Blah") or (TextBox.Value="Blah Blah") then

    ...

    Parens are optional. I like to use them so that I don't have to think about precedence rules ... No ambiguity.
    Back to Access ... ADO is not the way to go for speed ...

  3. #3
    Join Date
    Aug 2005
    Posts
    196
    Cheers for that mate

  4. #4
    Join Date
    Feb 2006
    Posts
    56
    minor point, but on your original example, your missing your trailing " at the end of the word existing.

Posting Permissions

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