Hello Everyone,
I am wanting to count the occurence of different records, for example:
MOT484354
PRN487522
COM45757
COM45775
PRN124872
PRN127754
MOT445778
COM444588
The results should be something like:
MOT - 2
PRN - 3
COM - 3
*The first 3 charachters let me know what the record is.
Any thoughts would be greatly appreciated.
13 2176
Group by Left([Field], 3)
And use a count of the field.
Group by Left([Field], 3)
And use a count of the field.
Thanks for the help. Is there away to get only one page report that gives a snapshot of the data in the table? I just want to be able to say that there were x number of this and y number of that, stuff like that.
That's what the grouping and counting should do, Group and count in a query and base the report off that.
That's what the grouping and counting should do, Group and count in a query and base the report off that.
I am not understanding what you are saying, could you explain more please?
If you have a query that groups by Left([Field], 3) and does a count on said field, the query will return the results you were looking for in Post 1, which is a summary of how many occurences fall under the 3 letter code.
Then you just make a report using this query.
If you have a query that groups by Left([Field], 3) and does a count on said field, the query will return the results you were looking for in Post 1, which is a summary of how many occurences fall under the 3 letter code.
Then you just make a report using this query.
One more question, how do you make a query group?
View > Totals
You should be able to set grouping and aggregate functions now.
I am using the following code: -
SELECT MaterialResult.PART_PART_NBR
-
FROM MaterialResult
-
GROUP BY MaterialResult.PART_PART_NBR
-
HAVING (((MaterialResult.PART_PART_NBR)=Mid([PART_PART_NBR],1,3)));
-
This returns only one record, that is not relevant, any thoughts?
I am using the following code: -
SELECT MaterialResult.PART_PART_NBR
-
FROM MaterialResult
-
GROUP BY MaterialResult.PART_PART_NBR
-
HAVING (((MaterialResult.PART_PART_NBR)=Mid([PART_PART_NBR],1,3)));
-
This returns only one record, that is not relevant, any thoughts?
My thought is you totally ignored my previous posts. -
SELECT Left(PART_PART_NBR, 3) AS ThreeLetterCode, Count(PART_PART_NBR) AS CountOfPart
-
FROM MaterialResult
-
GROUP BY Left(PART_PART_NBR, 3);
-
Thanks for the help my friend
NeoPa 32,556
Expert Mod 16PB
ChaseCox,
Have you managed to resolve your problem?
It seems to me you were struggling a bit to understand what Rabbit was saying maybe?
Be assured, he's right on the button, but I wanted to be sure you had caught up with him as it were.
Let us know if you need more help or if the issue is resolved.
-NeoPa.
I got it to work and it works fine. Thanks Rabbit.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Cro |
last post by:
Hello Access Developers,
I'd like to know if it is possible to perform a count in an expression
that defines a control source.
My report is based on a query. In my report, I want a text box to...
|
by: SJM |
last post by:
I have a report that displays records of real estate properties. It is
possible for each property to appear a number of times for various reasons.
Each record however is unique. What I would like...
|
by: Coy Howe |
last post by:
This one seems bizarre!
We have a database consisting of a main table and 12 - 15 "sub" tables,
which are connected via cascading relationships. The database performs
many complex calculations...
|
by: Stephen |
last post by:
Hello all
Run into a problem with a count query in access. It seems to count
either all the results or none depending on criteria even though
I have a query that selects the difference in...
|
by: jonathan184 |
last post by:
Hi I am having a problme where the results of the sql count is not matching the results of the perl script sql count.
The script was working fine up till Wed last week and after that the results...
|
by: wvmbark |
last post by:
First time poster... I just found this forum and it appears there's plenty of people here that could make short work of problem that's been driving me absolutely bonkers for months.
Every day we...
|
by: Pete |
last post by:
I need to create a single query (Not a SQL query) against a single
table that counts the number of records in the table, where the single
field "tmp" contains specific string values
If the field...
|
by: mfaisalwarraich |
last post by:
Hi Everybody,
I am using the following code to get the recordset of an external database.
Dim dbPatients As Database
Dim rsCountPatients As Recordset ' to count number of...
|
by: petter |
last post by:
Hi!
I have two questions: one question that regards the COUNT-function, and one about how to display a month even if I don’t have any data for that month.
I have an Access database where I want...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| | |