Results 1 to 8 of 8
  1. #1
    Firefighter22 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2011
    Posts
    9

    Iif statement help

    I have cascading combo boxes and I currently have the row source in my 2nd combo box as... [Forms]![frmPurchaseOrder]![Vendor]
    I need some sort of Iif statement that says...


    Iif Vendor=7, *show all inventory ID's*, [Forms]![frmPurchaseOrder]![Vendor]

    basically, how do you get the statement in there to "show all"?

  2. #2
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    As the criteria for Vendor you would use:

    [Forms]![frmPurchaseOrder]![Vendor] Or ([Forms]![frmPurchaseOrder]![Vendor] = 7)

  3. #3
    Firefighter22 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2011
    Posts
    9
    Hi
    That is what I have now, but I was wondering if there was a way to still show that for every ID EXCEPT for 7, which would show all of my records in the drop down instead of being limited.

  4. #4
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Quote Originally Posted by Firefighter22 View Post
    Hi
    That is what I have now, but I was wondering if there was a way to still show that for every ID EXCEPT for 7, which would show all of my records in the drop down instead of being limited.
    Post EXACTLY what you are currently using.

  5. #5
    Firefighter22 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2011
    Posts
    9
    Currently using..
    [Forms]![frmPurchaseOrder]![Vendor]

  6. #6
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Quote Originally Posted by Firefighter22 View Post
    Currently using..
    [Forms]![frmPurchaseOrder]![Vendor]
    So, when I posted to use this:
    Quote Originally Posted by boblarson
    [Forms]![frmPurchaseOrder]![Vendor] Or ([Forms]![frmPurchaseOrder]![Vendor] = 7)
    and you then said:
    Hi
    That is what I have now, but I was wondering if there was a way to still show that for every ID EXCEPT for 7, which would show all of my records in the drop down instead of being limited.
    you were not actually using what I wrote because if you used what I wrote it should give you exactly what you are looking for. So you need to use this WHOLE THING EXACTLY:

    [Forms]![frmPurchaseOrder]![Vendor] Or ([Forms]![frmPurchaseOrder]![Vendor] = 7)

  7. #7
    Firefighter22 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2011
    Posts
    9
    Looks like I read it wrong. Thanks Bob, was exactly what I needed.

  8. #8
    boblarson is offline --------
    Windows 7 64bit Access 2010 32bit
    Join Date
    Jun 2011
    Posts
    1,272
    Quote Originally Posted by Firefighter22 View Post
    Looks like I read it wrong. Thanks Bob, was exactly what I needed.
    Good, you had me wondering what was up because I was confident it should work.

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

Similar Threads

  1. where statement not right
    By tmcrouse in forum Forms
    Replies: 1
    Last Post: 09-27-2011, 09:11 AM
  2. Replies: 7
    Last Post: 08-17-2011, 01:49 PM
  3. for each statement in vba
    By tuyo in forum Access
    Replies: 0
    Last Post: 03-22-2011, 05:42 PM
  4. if statement
    By sirlosi in forum Queries
    Replies: 4
    Last Post: 03-07-2011, 11:26 AM
  5. Help with IF statement
    By mkallover in forum Programming
    Replies: 7
    Last Post: 01-04-2011, 04:47 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