Format event (Grouphead vs. Detail section)

  • Thread starter Thread starter Niklas Östergren
  • Start date Start date
N

Niklas Östergren

Hi!

Is it possible to refere to a control (txtEmailAddress) in the detail
section to set propertie visible (True/False) for a lable (lblEmailAddress)
in grouphead section?

I have tryed this in format event of the grouphead but it still shows
lblEmailAddress in the grouphead for the records without e-mail address!

TIA!
// Niklas
 
Niklas said:
Is it possible to refere to a control (txtEmailAddress) in the detail
section to set propertie visible (True/False) for a lable (lblEmailAddress)
in grouphead section?

I have tryed this in format event of the grouphead but it still shows
lblEmailAddress in the grouphead for the records without e-mail address!


A group header can refer to the value of fields in the first
detail record in the group. You can only look at an
aggregate of all the detail records in a group header.

Sometimes, this may be sufficient if all you need to know is
if all the details have a Null in a **field** (aggregate
functions only work with a record source field, not controls
in the report). Use a text box named txtEmailCount in the
group header with an expression like:

=Count([EmailAddress])

Then, you can use that in the group header's Format event:

lblEmailAddress.Visible = (txtEmailCount > 0)
 
OK!

Now I have learnt someting new today to! Thank´s a lot for your answer and
explanation!

// Niklas

Marshall Barton said:
Niklas said:
Is it possible to refere to a control (txtEmailAddress) in the detail
section to set propertie visible (True/False) for a lable (lblEmailAddress)
in grouphead section?

I have tryed this in format event of the grouphead but it still shows
lblEmailAddress in the grouphead for the records without e-mail address!


A group header can refer to the value of fields in the first
detail record in the group. You can only look at an
aggregate of all the detail records in a group header.

Sometimes, this may be sufficient if all you need to know is
if all the details have a Null in a **field** (aggregate
functions only work with a record source field, not controls
in the report). Use a text box named txtEmailCount in the
group header with an expression like:

=Count([EmailAddress])

Then, you can use that in the group header's Format event:

lblEmailAddress.Visible = (txtEmailCount > 0)
 
Back
Top