Format event (Grouphead vs. Detail section)

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
 
M

Marshall Barton

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)
 
N

Niklas Östergren

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top