Results 1 to 4 of 4
  1. #1
    aflamin24 is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Jul 2012
    Posts
    7

    Package dimensions query

    Hi I have a table with a bunch of packages. Each record is unique. I have 3 fields: height, length and width that I'd like to see if each package meets the criteria for. My criteria is that each package must be no larger than the dimensions of 7*16*16. The order of the dimensions do not matter, so if height of one package is 7, or less, then the other two fields can be up to 16 each. If the length is 7, or less, then the other two fields can be up to 16....im guessing you get the picture now. I have no idea how to write this criteria in terms that access will understand.



    If anyone can help that would be great. Hopefully I tagged this thread right, but I was just guessing.

    Thanks,
    Anthony

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    So at least one side must be <=7? Can't be 13x13x13?

    Try:
    MeetSpec: IIf([Height]<=16 And [Length]<=16 And [Width]<=16 And ([Height]<=7 Or [Length]<=7 Or [Width]<=7), True, False)
    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
    aflamin24 is offline Novice
    Windows 7 32bit Access 2003
    Join Date
    Jul 2012
    Posts
    7
    Thanks, this works perfectly. I guess I need to learn more about IIF() and its syntax....I appreciate the help!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,624
    Syntax not really complicated.

    An IIf() function basic structure:
    IIf(condition, result if true, result if false)

    Nested IIf:
    IIf(condition, result if true, IIf(another condition, result if true, result if false))

    Example of an IIf with multiple OR/AND conditions:
    IIf((condition1 AND (condition2 OR condition3)) OR condition4, result if true, result if false)

    Parenthesis can be critical, especially when mixing with OR operator.
    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.

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

Similar Threads

  1. code to determine correct dimensions
    By mbar in forum Programming
    Replies: 3
    Last Post: 05-03-2012, 04:27 PM
  2. Package ado with runtime app
    By MichaelG in forum Access
    Replies: 2
    Last Post: 10-24-2011, 08:08 PM
  3. .msi Package installed files
    By ManvinderKaur in forum Access
    Replies: 1
    Last Post: 08-22-2010, 12:43 PM
  4. package access dtabase in .msi
    By ManvinderKaur in forum Access
    Replies: 1
    Last Post: 08-12-2010, 09:53 PM
  5. building a distribution package
    By BevA in forum Access
    Replies: 0
    Last Post: 05-26-2006, 07:04 AM

Tags for this Thread

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