Newbie question: query related

DIDE

New member
Local time
Today, 08:37
Joined
Aug 13, 2009
Messages
2
Hi everybody,
I'm from Belgium and I have a question about queries.

Let me explain my situation.
I have a DB "clients" with for example...

client1 1
client1 7
client2 3
client1 1
client3 5
client3 1
client2 1

When I make a grouped report, I could have

client1 9
client2 4
client3 6

Now, "the" question... I want to have a query (not a report) that only gives me the results like the above report.

Can anyone help me, I have searched the help within Access, the internet but haven't found any solution. Can this be done?

Thanks!
 
Last edited:
With your query in design view click the Totals (Sigma "Σ") button in the tool bar. This will then add an additional row to your query builder grid that will give a number of options to Group By, Sum, Avg, count etc.

However you will have to use a Left() function to reduce your Client names to like entities.
 
Done that but i does't help.
I need to "group" by clientname and also have the sum of their records.
All of this must be done in a query.
 
All this is achievable using a Totals query and the various options it allows. it's just a matter of using the correct ones.

Did you do this;
However you will have to use a Left() function to reduce your Client names to like entities.
 
I'm not sure if you know sql or want to deal with it, but if go into sql view, where it says select (Insert what ever field the number stands for here), proceed it by the function Sum. Then at the End of the code type "GROUP BY [Client]" So the code should look something like this:
SELECT [Clients], Sum([Numbers])
FROM [insert table here]
GROUP BY [Clients]

I just guessed at the field names, if you are going to be doing alot of access work, its worth it to learn at least basic sql. Hope this helps.
 

Users who are viewing this thread

Back
Top Bottom