Hi there I have 2 tables with account numbers.
1st table is named 30 dy ltr & the second is AFS Bankrupt Loans(3).
the 1st table picks up accounts that are 30 days past due, the 2nd one picks up all loans that are in bankruptcy. Sometimes I get accounts that are 30 days past due & that same account is in the bankruptcy table. I would like to exclude that loan from my query.
I have no idea how to start on this... any ideas???
Last edited by jgomez; 12-06-2011 at 01:04 PM.
Create a query joining the two tables on the account numbers. In an expression create an IIF statement that says soemthing like this: IIF([BankruptcyField]="yes" and [PastDueField]="yes", "Exclude","Include"). In your criteria for this new field put ="Include." It is difficult to give you something more exact without knowing your exact table layouts, but this should give you a good idea of how to achieve this.
Alan
Alan
Click the * below to say thanks.
Database Principles
Pivot Table Tips
Good Excel Video Tutorials
Sumifs or SumProduct
DataPig Access Tutorials
MS Query Tutorial
Worst Pie Chart Ever?
Alan's method will certainly do the trick. I'm wondering what kind of join you are using. If you are using an inner join, you should only get each account number once, provided there is only one account in each table. Can you provide your SQL statement?
Is your code running too slowly?
Does your workbook or database have a bunch of duplicate pieces of data?
Have a look at this article to learn the best ways to set up your projects.
It will save both time and effort in the long run!
Dave
I do get the account only once but I shoudn't get it period... Alan I can't thank you enough for showing me this... it worked.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks