Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    controll in txtbox go in error (2000 sr -1)

    .... ????why????
    If i insert in txbox LAV the code go on msgbox????
    In effect i want to permit only LAV, STO, ANN

    If Me.STATO.Text <> "LAV" Or Me.STATO.Text <> "STO" Or Me.STATO.Text <> "ANN" Then
    MsgBox ("CODICE STATO NON AMMESSO"), vbInformation
    Me.STATO = ""
    Me.STATO.SetFocus
    MsgBox ("VALORI AMMESSI: LAV - STO - ANN"), vbInformation
    Exit Sub
    End If

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

    Re: controll in txtbox go in error (2000 sr -1)

    Use And instead of Or in the If ... Then line.

    PS You haven't reacted to replies to several of your previous questions, for example <post:=614,188>post 614,188</post:>, <post:=613,974>post 613,974</post:>, <post:=612,804>post 612,804</post:>, <post:=612,448>post 612,448</post:>, <post:=610,448>post 610,448</post:>, <post:=608,653>post 608,653</post:> and <post:=608,231>post 608,231</post:>

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: controll in txtbox go in error (2000 sr -1)

    Sorry but only for a distraction.
    Sal.

Posting Permissions

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