Re: How to summarize recordset...Select Distinct alternative?



Thanks Bob,
sorry bout that...

vb6
ado / adox 2.8
(writing to .mdb format)
(not using access, just jet)
Private Const DB_PROVIDER As String = "Microsoft.Jet.OLEDB.4.0"
Set moCatalog = New ADOX.Catalog
moCatalog.Create "Provider=" & DB_PROVIDER & ";" & _
"Data Source=" & msDatabaseFileName '& ";Persist Security Info=False"


TableExample
Fields: FldFile | FldPage | FldItem
Rows:
File1 Page1 Item1
File1 Page1 Item1
File1 Page1 Item1
File1 Page1 Item2
File1 Page1 Item2
File1 Page1 Item3

File1 Page2 Item1
File1 Page2 Item1
File1 Page2 Item1
File1 Page2 Item3
File1 Page2 Item4
File1 Page2 Item4

File2 Page1 Item1
File2 Page1 Item1
File2 Page1 Item1
File2 Page1 Item2
File2 Page1 Item2
File2 Page1 Item3

File2 Page2 Item1
File2 Page2 Item1
File2 Page2 Item1
File2 Page2 Item3
File2 Page2 Item4
File2 Page2 Item4

<Report:>
File/Page Summary:
File1
Page1
Item1 Count(3)
Item2 Count(2)
Item3 Count(1)
Page2
Item1 Count(3)
Item3 Count(1)
Item4 Count(2)
File2
Page1
Item1 Count(3)
Item2 Count(2)
Item3 Count(1)
Page2
Item1 Count(3)
Item3 Count(1)
Item4 Count(2)

Totals Summary:
Item1 TotalCount(12)
Item2 TotalCount(4)
Item3 TotalCount(3)
Item4 TotalCount(4)
<End Report>

something like that?
I hope that's pretty self explanatory
If something is not obvious, let me know
:-)
Many thanks for looking at this and taking time to respond.

Mark



"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:%23Uo9xSjJIHA.1164@xxxxxxxxxxxxxxxxxxxxxxx
MP wrote:
I have a table with (lets say) 3 fields: fldFile, fldPage, fldItem
I want a summary report of Items/counts on a per file/ per page basis.
At present I do something more or less like this
(pseudocode ... )

1. Please tell us the type and version of database you are using
2. Show us a few rows of sample data in tabular format - just enough
rows to illustrate your task
3. Show us the results you wish to achieve from that sample data - again
in tabular format
4. Explain the desired results where it isn't obvious.

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.




.



Relevant Pages

  • Re: Query help: What is the best and most efficient way to do this
    ... > are over 100,000 records in this format in the source table: ... So did the sample data you provided represent a single row in the source ... Please reply to the newsgroup. ...
    (microsoft.public.sqlserver.programming)
  • Re: SBS User Email weird issue... (Sorry for long delay)
    ... Microsoft CSS Online Newsgroup Support ... Format of the e-mail to HTLM. ... Rich Format, Plain Format, please select Rich Format. ...
    (microsoft.public.windows.server.sbs)
  • Re: Formatting a text field in report
    ... I would love to go to an Access-specific Newsgroup but when I go the the Newsgroups area from the Microsoft site, there is no newsgroup that I see that can satisfy general Access questions. ... It is a text field because in this report, my fields are based on a query ... results where I created a format expression that gives me a specific format ... MVP FAQ site: http://mvps.org/ ...
    (microsoft.public.office.misc)
  • Re: Format of addresses in personal letters
    ... please post all follow-ups to the newsgroup so ... it is not a standard MS format thats for sure. ... >> Microsoft MVP ... Several lines of typing in each address ...
    (microsoft.public.word.newusers)
  • Re: Formatting a text field in report
    ... Newsgroups area from the Microsoft site, there is no newsgroup that I see ... results where I created a format expression that gives me a specific ... Microsoft Office MVP ... MVP FAQ site: http://mvps.org/ ...
    (microsoft.public.office.misc)