Re: How to summarize recordset...Select Distinct alternative?
- From: "MP" <NoSpam@xxxxxxxxxx>
- Date: Tue, 13 Nov 2007 21:32:54 -0600
"Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx> wrote in message
news:Ot8dKQmJIHA.4880@xxxxxxxxxxxxxxxxxxxxxxx
Bob Barrows [MVP] wrote:
darn, can't figure out the filter looping method
this works perfect for the first file and first page...but how to get the
next page, and next, and next ... to the end of first file,
..... then next file (all pages)...next file(all pages).. etc to end of all
files....?
With oRsPcmkCountAll
.MoveFirst
bFirstFile = True'just print file name once
bFirstPage = True'just print page name once
'get first filename
ThisDwgName = .Fields.Item("fldDwgName").Value
'get first pagename
ThisLayoutName = .Fields.Item("fldLayoutName").Value
'---------------------- filter section
'apply first filter
oRsPcmkCountAll.Filter = "fldDwgName='" & ThisDwgName & "' and
fldLayoutName='" & ThisLayoutName & "'"
'---------------------- how and where do I put successive filters
for each page/each file?
While Not .EOF
If bFirstFile Then
bFirstFile = False
logEntry "Pcmks in file" & ThisDwgName
End If
If bFirstPage Then
bFirstPage = False
logEntry vbTab & "Layout " & ThisLayoutName
End If
logEntry vbTab & vbTab & "Pcmk " &
oRsPcmkCountAll.Fields.Item("fldPcmk") & " (" &
oRsPcmkCountAll.Fields.Item("PcmkCount") & ")"
.MoveNext
Wend
'ok now i need the next page of the first file but it seems i'd have to hard
code another loop...one for each page and one for each file...which is
obviously not right....
'''this would filter for next layout for first file...but somehow it has to
be inside the .eof loop...but where???
oRsPcmkCountAll.Filter = "fldDwgName='" & ThisDwgName & "' and
fldLayoutName<>'" & ThisLayoutName & "'"
While Not .EOF
...another loop? no I don't think so
Wend
End With
my poor old brains just not getting it
:-)
Mark
.
- Follow-Ups:
- Re: How to summarize recordset...Select Distinct alternative?
- From: Bob Barrows [MVP]
- Re: How to summarize recordset...Select Distinct alternative?
- References:
- How to summarize recordset...Select Distinct alternative?
- From: MP
- Re: How to summarize recordset...Select Distinct alternative?
- From: Bob Barrows [MVP]
- Re: How to summarize recordset...Select Distinct alternative?
- From: MP
- Re: How to summarize recordset...Select Distinct alternative?
- From: Bob Barrows [MVP]
- Re: How to summarize recordset...Select Distinct alternative?
- From: MP
- Re: How to summarize recordset...Select Distinct alternative?
- From: Bob Barrows [MVP]
- Re: How to summarize recordset...Select Distinct alternative?
- From: Bob Barrows [MVP]
- How to summarize recordset...Select Distinct alternative?
- Prev by Date: Re: How to summarize recordset...Select Distinct alternative?
- Next by Date: Re: How to summarize recordset...Select Distinct alternative?
- Previous by thread: Re: How to summarize recordset...Select Distinct alternative?
- Next by thread: Re: How to summarize recordset...Select Distinct alternative?
- Index(es):