Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excluding records

Status
Not open for further replies.

qwe1204

Programmer
Aug 30, 2001
21
GB
I have a table in an access db which holds information about bank account numbers. An account can appear in the table more than once with a different status code. I need to see if an account has all the possible status codes and exclude them from the recordset if they have.

The records appear in a format similar to the following...

Account no. Status
12345678 9
12345678 38
12345678 49
12345678 52
87654321 9
87654321 49 etc...
 
Hallo,

If you make a primary key (or other index) containing just the Account Number and Status fields. This will stop an account having the same status twice. Then you can just count the number of entries for each account number (use group by account number in a query). If this is the number of status values then they are all 'used up' and that account number can be omitted.

- Frink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top