Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

access grouping data back

Forum home » Delegate support and help forum » Microsoft Access Training and help » Access Grouping data on the back of rules

Access Grouping data on the back of rules

ResolvedVersion 2007

Stephen has attended:
Access Introduction course
Access Intermediate course
Access Advanced course

Access Grouping data on the back of rules

Hello, I am trying to write 3 queries that group certain data based on specific rules. I have a table of holdings. There are two types of holdings "Held" and "Not-Held". Each line of data has a client account number attached to it. The 3 queries are

1) query that will show me all the clients that only have "Held" posioions and no"Not Held" postions
2) All the clients that have "Not-Held" positions and no "Held" Postions.
3) All the clients that have both "Held" and "Not Held" postions

I have tried for 2 days without any luck

Thanks

RE: Access Grouping data on the back of rules

Hello Stephen,

Hope you enjoyed your Microsoft Access courses with Best STL.

Thank you for your question regarding creating queries.

If your 'Held' / 'Not Held' fields have a "Yes/No" data type then create the query to include whatever tables you need and add the relevant fields to the query design grid.

Client Account Number / Held / Not-Held

Query 1) In the criteria row type Yes for Held and No for Not-Held

Query 2) In the criteria row type No for Held and Yes for Not-Held

Query 3) In the criteria row type Yes for Held and Yes for Not-Held

Since I cannot see your database and don't know what the data type is for each field I'm not sure if this will work for you. If it doesn't work then you will have to provide me with more information.

I hope this resolves your question. If it has, please mark this question as resolved.

If you require further assistance, please reply to this post. Or perhaps you have another Microsoft Office question?

Have a great day.
Regards,

Rodney
Microsoft Office Specialist Trainer

RE: Access Grouping data on the back of rules

Managed to resolve it with the following SQL statement that one of our programmers helped me with 3 different versions of the below

WHERE (((Exists (SELECT 1 from Client_Data CD2, Holdings H2 where H2.SecuritiesHeld="Held" and CD.ClientGripsCode = CD2.ClientGripsCode and CD2.ClientGripsCode = H2.ClientGripsCode))<>False) AND ((H.SecuritiesHeld)="Not-Held"));

Thanks

Access tip:

Changing MS Programs Text Size

A handy way to increase or decrease the size of text in Microsoft Word, Microsoft PowerPoint, Microsoft FrontPage, or Microsoft Publisher, first, select the text you want to resize.

Then, to increase the font size, press CTRL+SHIFT+>.

To decrease the font size, press CTRL+SHIFT+<.

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.