|
Jeanie,
Following sub-routine in Detail_Format event of the
report should be able to get you the desired results.
TxtGrpCount is the name of text box serving as counter
for the group in question (i.e. _expression_ as =1 and running sum property
as "over group").
Best wishes,
A.D.Tejpal
====================================
Private Sub Detail_Format(Cancel As Integer, _
FormatCount As
Integer) If TxtGrpCount >
4 Then Detail.Visible =
False Else
Detail.Visible = True End If End
Sub
====================================
----- Original Message -----
Sent: Monday, September 26, 2005
17:50
Subject: [AccessDevelopers] Re: row
number for query result + Limit
Thanks, Luis. The only problem with that is that I need
the top 4 in EACH class and the class is only separated from within the
Report. The qryResults finds all of the boats in the event that have
finished, then the Report separates by Division and then Class within
the Division. Event ..
Division 1 ... Class
A ... Class B ..
Division 2 ... Class
A ... Class
B ... Class
C ... Class D I need the top 4 in
each Class, within the Divisions. Selecting the Top 4, ascending
from within the query gives me 4 records only. In this case, it was
the first place in Div 1, Class A; and the first place in Div 2 Classes A,
C & D.
There must be something in the driver code for the report
that I can adjust, but I can't find anywhere to do
that.
Anyone?
-- Jeanie
--- In [email protected],
Jose Luis Jr Mora Jr <[EMAIL PROTECTED]...>
wrote: > Hi Jeanie, > > One way that I've dealt with
this type of issue is by creating a query and only displaying the top 4
(or bottom 4) records. If you create a query with the fields you
would like to display, sort the field that your would like to get the top
4 records on (ascending if you want the bottom 4 or descending if you want
the top 4) and then in the Query Design toolbar there should be a
drop-down option. If you type in the number of records you would
like, this should solve your problem. You could then create your
report off from this query. > > I hope this works for
you. > > > > Jeanie S <[EMAIL PROTECTED]...> wrote: > Hi
all, > > I too have the need to show a count in a report and I
have used the > recommended text box with the control source =1 and the
running sum > Over Group. It works well (I am not reversing the
order like the > original question). > > However,
although my full report works well, giving me the results I > need
within each group, I would like to have a "Summary Report" that >
only shows the first 4 records of each group. This report is for
> the results of a race and at the end we need to be able to present
> awards to the 1st through 4th place finishers of each group. I
can > obviously manually extract those results from the multiple page
> report, but I'd like to know if it can be done automatically. >
> Anyone have an idea of how to show just the first 4 records
??? > > -- Jeanie > > --- In [email protected],
"A.D.Tejpal" <[EMAIL PROTECTED]...> >
wrote: > > Dawn, > > > >
In order to get a reverse counter on the report, following > course of
action is suggested. > > > > Place
an unbound text box named TxtTotRec in report header. > Place the
following statement in format event of report header. >
> TxtTotRec = DCount("*", Me.RecordSource) >
> > > > > Place a hidden text
box named TxtCount, having _expression_ =1 > in detail section. In data
tab of properties dialog box for this > text box, set the running sum
property to overall. > > > > Place
a text box named TxtRevCount in the detail section, > having the
following _expression_, so as to display the reverse count. >
> = [TxtTotRec] + 1- [TxtCount] > >
> > Best wishes, > > A.D.Tejpal > > >
> ----- Original Message ----- > > From:
Crosier, Dawn > > To: [email protected]
> > Sent: Friday, September 16, 2005 20:51 >
> Subject: RE: [AccessDevelopers] row number for query
result > > > > > > Glenn - >
> > > I have a need to reverse the numbering in a
report. Would you > have an idea of how to do that? For
instance, if there were 5 > records, to count backwards 5, 4, 3, 2,
1? My thought is to count > the records first, and then subtract
from them, but how to do that? > > > > My
report is a listing of Winners in a contest, and we award > from 5th
place forward. > > > > Dawn Crosier >
> Application Specialist > > "Education
Lasts a Lifetime" > > > >
This message was posted to a newsgroup. Please post replies and
> questions to the group so that others can learn as well. >
> > > > > -----Original
Message----- > > From: [email protected] >
> [mailto:[EMAIL PROTECTED] On Behalf Of Jones,
> Glenn P > > MSG (Ret) FL-ARNG >
> Sent: Thursday, September 15, 2005 9:18 AM >
> To: [email protected] >
> Subject: RE: [AccessDevelopers] row number for query
result > > > > Greetings, >
> I do not understand why you want to do record numbering in
your > query. > > This is usually done on the
report. > > The below link will give you directions on
how to do this. > > > > http://office.microsoft.com/en-us/assistance/HP051873831033.aspx >
> > > Regards > > > >
Glenn P. Jones > > IHS
Please zip all files prior to uploading to Files section.
SPONSORED LINKS
YAHOO! GROUPS LINKS
|