Results 1 to 4 of 4
  1. #1
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839

    If then Elseif then....

    I want to have three choices to pass allow the colsue of another field:

    Approved, Denied, or withdrawn. Is the below close to being correct?


    If Me!Final_VOTE <> "Approved" Then


    ElseIf Me!Final_VOTE <> "Denied" Then
    ElseIf Me!Final_VOTE <> "Withdrawn" Then
    Action_Complete = False
    Else
    MsgBox "Final Vote cannot be Pending"
    Exit Sub
    End If

    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,921
    Why so complicated?

    If Me!Final_VOTE = "Pending" Then
    MsgBox "Final Vote cannot be Pending"
    Me!Action_Complete = False
    End If

    Why are users allowed to input Pending in the first place? Use a combobox with limited choices.

    Action_Complete looks like redundant field. This determination can be evaluated from the data in Final_VOTE. A Date_Complete would be more informative.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    Good point. I can limit the list with no edits.

  4. #4
    Thompyt is offline Expert
    Windows 8 Access 2010 32bit
    Join Date
    Sep 2014
    Location
    El Paso, TX
    Posts
    839
    Action_Complete looks like redundant field. This determination can be evaluated from the data in Final_VOTE.

    Action_Complete is the final close out of the record. It is used as a switch. Most likely I could simplify it.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 03-03-2013, 07:18 AM
  2. If ElseIf Not Working
    By theperson in forum Programming
    Replies: 5
    Last Post: 02-27-2013, 07:40 AM
  3. Help with ElseIf Statements
    By dshillington in forum Programming
    Replies: 6
    Last Post: 12-16-2011, 03:32 PM
  4. Easy one, If then ElseIf
    By Bruce in forum Forms
    Replies: 4
    Last Post: 12-01-2011, 12:44 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums