A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Changing report header based on line data?



 
 
Thread Tools Display Modes
  #1  
Old May 18th, 2004, 05:09 PM
spidermanuk
external usenet poster
 
Posts: n/a
Default Changing report header based on line data?


Access2000 - Forms..

I have a text1 label in the Header section which I want to say "POSTAL"
UNLESS one of the line items in the Detail_Format section says
"FEDEX"!

Whenever I put a
Me.Text1.value = "Fedex"
in the Detail_Format section (to prove a point) it gets ignored.

I short, can I change any of the text/fields in the HEADER section of
the form whilst I am in the BODY or FOOTER section?

help.

Spider.



------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

  #2  
Old May 19th, 2004, 05:05 PM
Marshall Barton
external usenet poster
 
Posts: n/a
Default Changing report header based on line data?

spidermanuk wrote:


Access2000 - Forms..

I have a text1 label in the Header section which I want to say "POSTAL"
UNLESS one of the line items in the Detail_Format section says
"FEDEX"!

Whenever I put a
Me.Text1.value = "Fedex"
in the Detail_Format section (to prove a point) it gets ignored.

I short, can I change any of the text/fields in the HEADER section of
the form whilst I am in the BODY or FOOTER section?



No, not in any convenient way. The header has already been
processed by the time you get to look at anything beyond the
first detail.

However, you can use aggregate functions in the group
header. This will allow a control in the header to
calculate a total across all the details in the group. You
can then use a carefully constructed total to determine how
many details have a specific value.

I think you'll get what you want by using this kind of
expression in the text1 text box:

=IIf(Sum(shipviafield = "FedEx") = 0, "Postal", "FedEx")
--
Marsh
MVP [MS Access]
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:06 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.