Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Grouping data in a query from an IIF stmt
Natalie 

11 years ago
Hi All,
First off I have no SQL experience so I'm hoping to be able to do this using expression builder in a query. Here is what I'm trying to do:
I have two tables Investigation (parent) and Account(child).  I'm trying to summarize the results of all the account statuses that fall under an investigation by using a multiple IIF stmt but I cant seem to group it at the investigation level -

IvestigationID AccounTRefNum AccountNum AccountClassification
444 1 1111 Unusual
444 2 2222 Unconfirmed
444 3 55555 Not Fraud
444 4 3333 Unusual
444 5 4444 Not Fraud

The result should be Unusual.

Here is the expression I have but cant seem to group it at the Investigation level:
IIf([Tb_Accounts].[AccountClassification]="Fraud","FRAUD",IIf([Tb_Accounts].[AccountClassification]="Unusual","UNUSUAL",IIf([Tb_Accounts].[AccountClassification]="Unconfirmed","UNCONFIRMED",IIf([Tb_Accounts].[AccountClassification]="Not Fraud","NOT FRAUD","REVIEW"))))

I'm sure this is easy if I knew sql but I cant seem to find anything online.  Any help would be GREATLY appreciated.
Nat


Reply from Alex Hedley:

Why not just create a Report
Then add a Grouping and Sorting Level and add the Account Classification as a Group, then you can see each type together.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/16/2026 10:41:27 PM. PLT: 1s