Results 1 to 2 of 2
  1. #1
    Gina Maylone is offline Always learning
    Windows 7 64bit Access 2013
    Join Date
    Jun 2013
    Location
    Afton, MN
    Posts
    544

    Should I /can I use a Select Case statement?

    Hello,



    I've been studying up on Select Case statements, and just cannot wrap my head around it. I have many if, then, else statements I need to evaluate for billing purposes
    Code:
    If Not IsNull(Forms!account!Order.Form!EndDate) And IsNull(Forms!account!Order.Form!startDate) and Forms!account!Order.Form!Closed = -1 And Forms!account!UseMonthlyRate = -1 Then
    MsgBox "there is an end date but no start date, and account qualifies"
    End If
    I also need to evaluate the number of days a piece of equipment has been out, and if it is greater than 24(based on the actualnumberofdays or last day of the month(LDOM). When I have more than 3 nested if statements, the msgbox doesn't fire.

    Any direction will be greatly appreciated.

  2. #2
    llkhoutx is offline Competent Performer
    Windows 8 Access 2010 32bit
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    The message doesn't fire because all the tests don't pass. Use the debugger to check the value of the test components.

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

Similar Threads

  1. CASE STATEMENT or IF-ELSE-THEN? HELP
    By Shakenaw in forum Access
    Replies: 9
    Last Post: 06-08-2015, 11:24 AM
  2. Replies: 4
    Last Post: 10-09-2014, 12:58 PM
  3. Case Statement
    By RussH in forum Programming
    Replies: 1
    Last Post: 08-12-2013, 02:50 PM
  4. if or case statement and how
    By Dannat in forum Queries
    Replies: 1
    Last Post: 01-31-2012, 10:35 AM
  5. Help with Select Case statement
    By focosi in forum Access
    Replies: 4
    Last Post: 08-09-2011, 12:01 AM

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