Consulting

Results 1 to 4 of 4

Thread: IIF Help in Table

  1. #1
    VBAX Regular
    Joined
    Sep 2020
    Posts
    51
    Location

    IIF Help in Table

    Hello,

    In the attached database I have a table called "Table1". In that table there's a column that lists some Account Numbers (5th column from the left). I'm trying to come up with a query/formula that searches each account number, to see if it's listed in the DRIPCash table (also provided in the database). If the account number is listed then the word "Cash" needs to appear in the corresponding account number's row in the DRIP Election column in Table 1 (towards the end of the table). If the Account in Table 1 isn't listed in the DRIPCash table, then the DRIP Election column should read "Reinvest" for that account. I was thinking some sort of nested =IIF statement. Like, if true (and the account is listed) show "Cash", if false then "Reinvest". But i'm all ears if there's a better way.

    Right now the DRIP Election column is completely blank in Table1. The end result should look exactly like the table does, with the one exception of the DRIP Election column being populated with either "Cash" or "Reinvest", based on if the account number appears in the DRIPCash table or not.

    Hopefully this makes sense.

    Thanks so much!
    Attached Files Attached Files

  2. #2
    i don't think DRIP Election field is needed in table1 when you can Calculate it in a query (see Query1).
    Attached Files Attached Files

  3. #3
    VBAX Regular
    Joined
    Sep 2020
    Posts
    51
    Location
    Quote Originally Posted by arnelgp View Post
    i don't think DRIP Election field is needed in table1 when you can Calculate it in a query (see Query1).
    hmmm....not sure what I'm doing wrong here. I'm literally copying the IIF statement into my database and it's returning just the "Cash" items. The query is leaving off all the Reinvest lines.

    The DRIPCash table in Access is actually a linked excel table. Not sure if that matters or not.

  4. #4
    VBAX Regular
    Joined
    Sep 2020
    Posts
    51
    Location
    Nevermind. It works now. For whatever reason when I tried to replicate that query on my own it didn't work. However, when I clicked and dragged the query over to my database it works. Probably user error on my part somewhere.

    Thanks for your help...again!

Posting Permissions

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