Patterncount counts the number of times a specified string appears inside another specified string. This won't work for searching across multiple records
There are many ways to get your counts.
a) A summary report with a sub summary layout part "when sorted by" Field1 and a "count of" summary field in that sub summary layout part can count how many times each value appears if you show all records and then sort on field 1.
b) a related table with one record for each value of Field1 can be used in a relationship with either a summary field or a calculation field using the count function can count the number of records with each value.
c) A self join relationship can be used to count all records with a specified value or all records with the same field 1 value as the current record.
d) ExecuteSQL can count the number of records for each value or just one specified value.
So I tried a SQL format and I'm having difficulty with it (coming up with wrong numbers) and I'm not quite sure why, heres what I tried:
FROM Table 1
WHERE Field 1 = 'A'"
Are you getting a wrong result of a question mark or a wrong result? What you show would generate a syntax error, but that's probably just because you aren't using real field and table names in your example. (Need to quote the names when there are spaces in the name.)
Is the field of defined in manage database of type text or type number?
Is there any chance that some other text, such as a return is also present in this field in some cases?
Is there any chance someone held down the shift or control key while selecting values and selected more than one value for the same field?
Found the right script!!! For those who are searching and need a similar answer: http://stackoverflow.com/questions/27870805/finding-number-of-occurrences-for-specific-value
Thank you PhilModJunk!!! You still helped quite a bit!!
I did point out that you needed to quote your names and asked if you were getting a ? or a wrong value....
I saw the response to the Stack Overflow post before I had a chance to get back to you PhilModJunk, You were 100% correct and thank you for your time and help!