Re: Show Field for "Last" Record in Group Only
From: Duane Hookom (duanehookom_at_NO_SPAMhotmail.com)
Date: 03/26/05
- Next message: Duane Hookom: "Re: Show Field for First Record in Group Only"
- Previous message: IrisMae40: "Re: Eliminating square boxes in a text field"
- In reply to: Simon Shutter: "Show Field for "Last" Record in Group Only"
- Next in thread: Simon Shutter: "Re: Show Field for "Last" Record in Group Only"
- Reply: Simon Shutter: "Re: Show Field for "Last" Record in Group Only"
- Messages sorted by: [ date ] [ thread ]
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 >>>> >>> >>> >> >> > > >
- Next message: Duane Hookom: "Re: Show Field for First Record in Group Only"
- Previous message: IrisMae40: "Re: Eliminating square boxes in a text field"
- In reply to: Simon Shutter: "Show Field for "Last" Record in Group Only"
- Next in thread: Simon Shutter: "Re: Show Field for "Last" Record in Group Only"
- Reply: Simon Shutter: "Re: Show Field for "Last" Record in Group Only"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|