Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Jul 2001
    Posts
    280
    Thanks
    0
    Thanked 0 Times in 0 Posts

    nested ifs (Access 2000)

    I need some help with the nesting of further conditions in my codes.I am a bit confused how to arrange them
    and i beg for help.

    I am defining the unit price depending on the category of the client with the help of Select case statement.
    After that i am definign whether there is a promotion or not depending on the toggle buttons CmdPromotionSmall
    and CmdPromotionBig
    My code for the first select case is like that

    Case 1
    If Parent!CmdPromotionSmall = False And Parent!CmdPromotionBig = False Then
    ctl = Me!consignment
    End If
    If Parent!CmdPromotionSmall = True Then
    If Me!size < 20 Then
    ctl = Me!consignment * MyRate
    Else
    ctl = Me!consignment
    End If
    If Parent!CmdPromotionBig = True Then
    If Me!size > 20 Then
    ctl = Me!consignment * MyRate
    Else
    ctl = Me!consignment
    End If
    End If

    I have 12 cases and i must repeat the conditions for each case.
    I have heard that the toggle button has triple functions, can i use one toggle bujtton only?


    I get the results for the promotions only. I am afraid this is not the right way to nest the conditions.
    Is there a better way of doing this.
    I am sending also the attachement

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

    Re: nested ifs (Access 2000)

    It is not clear from your description or from the attached database what you want to do in each case. Is there a difference depending on kindid, or is the code the same each time?

    Note: the variable MyRate isn't defined anywhere.

Posting Permissions

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