Re: Show Field for "Last" Record in Group Only

From: Duane Hookom (duanehookom_at_NO_SPAMhotmail.com)
Date: 03/26/05


Date: Sat, 26 Mar 2005 12:15:37 -0600

You could try
-Create a text box in the detail section
    Name: txtDetCount
    Control Source: =1
    Running Sum: Over Group
    Visible: No
-Add a text box to the Group Header
    Name: txtHdrCount
    Control Source: = Count(*)
-Add code to the On Format event of the Detail Section:
    Me.MoveLayout = Me.txtDetCount <> Me.txtHdrCount

This is just a WAG that might need to be played with to get it to work.

-- 
Duane Hookom
MS Access MVP
"Simon Shutter" <a@b.com> wrote in message 
news:Opu5UhiMFHA.2736@TK2MSFTNGP09.phx.gbl...
> Duane et al,
>
> Great tip - is there an equivalent method for putting a footer field
> adjacent to the last record in the details section?
>
> Tx
>
>>>I would make sure the header section and detail section are the same
>>>height. Remove the extra control from the detail section. Then add code 
>>>to
>>>the Header Section On Format event:
>>>    Me.MoveLayout = False
>>>
>>> -- 
>>> Duane Hookom
>>> MS Access MVP
>>> --
>>>
>>> "Simon Shutter" <a@b.com> wrote in message
>>> news:OoOnwFQMFHA.1156@TK2MSFTNGP09.phx.gbl...
>>>> Hi Folks,
>>>>
>>>> I want to add a header field to each group of records on a report.
>>>> Normally I can just create a header for that field but in this case I
>>>> want to have the header adjacent to the first record of the group and
>>>> not above the group.
>>>>
>>>> My solution was to add two text boxes (txt1 and txt2) associated with a
>>>> numeric field common to the group.  For txt1 I set the Running Sum
>>>> property to Over Group.  I made both text boxes invisible since they
>>>> were not needed in the report output.  Then I set the conditional
>>>> formatting property of the header field to Expression Is   txt1.value 
>>>> <>
>>>> txt2.value and the font color to white.  This has the following effect
>>>>
>>>> header field    txt1    txt2
>>>> xxxx (black)    1        1
>>>> xxxx (white)    2        2
>>>> xxxx (white)    6        3
>>>>
>>>> Is there an easier, elegant way to do this?
>>>>
>>>> Tx, Simon
>>>>
>>>
>>>
>>
>>
>
>
> 


Relevant Pages

  • Re: Show Field for First Record in Group Only
    ... > "Simon Shutter" wrote in message ... >>>I would make sure the header section and detail section are the same ... >>> Duane Hookom ... I want to add a header field to each group of records on a report. ...
    (microsoft.public.access.reports)
  • Re: [xnews] new icons and formatting?
    ... >>> News servers and agents aren't required to support anything more than ... > limit on the length of header lines, body lines, /or header logical ... Each header field is logically a single line of characters comprising ...
    (news.software.readers)
  • Re: Hellow again
    ... Some service providers archive every message that is transmitted. ... Check this box to prevent such a service from archiving any of the messages you post in any group by adding an "X-No-Archive:yes" header field to the message. ...
    (news.software.readers)
  • Re: Corrupted Subject and From header in Amazon.co.uk mail
    ... Discussion about encoded words in a Subject header of a ... Usenet article that may be too long, ... Compliant software MUST NOT generate header ... length of a header field prescribed by this standard. ...
    (comp.mail.pine)
  • Re: Show Field for First Record in Group Only
    ... I would make sure the header section and detail section are the same height. ... > I want to add a header field to each group of records on a report. ... For txt1 I set the Running Sum ... > header field txt1 txt2 ...
    (microsoft.public.access.reports)

Quantcast