Visible Property in Group Header

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a label that I would like to have visible/invisible depending on the
value of a field in the group header. I can't seem to get it to work. My
macro looks like this:

CONDITION: [gsaflag]="OM"
SetValue

ITEM: [Reports]![r_SeparateQuote]![OpenMkt].[Visible]
EXPRESSION: Yes

followed by
CONDITION: [gsaflag]<="OM"
Set Value

ITEM: [Reports]![r_SeparateQuote]![OpenMkt].[Visible]
EXPRESSION: No


where OpenMkt is the name of the label (which is a line of text). I have
tried calling the macro from the ON FORMAT of the group header's property,
and have also tried it on the ON PRINT. It doesn't work in either case. Any
ideas what I'm missing. Thanks so much in advance.
 
Louise,

Do I understand correctly that the OpenMkt label is also in the group
header section?
 
Yes, it is. The gsaflag field is also in the group header. Thank you for
your response.
Louise

Steve Schapel said:
Louise,

Do I understand correctly that the OpenMkt label is also in the group
header section?

--
Steve Schapel, Microsoft Access MVP
I have a label that I would like to have visible/invisible depending on the
value of a field in the group header. I can't seem to get it to work. My
macro looks like this:

CONDITION: [gsaflag]="OM"
SetValue

ITEM: [Reports]![r_SeparateQuote]![OpenMkt].[Visible]
EXPRESSION: Yes

followed by
CONDITION: [gsaflag]<="OM"
Set Value

ITEM: [Reports]![r_SeparateQuote]![OpenMkt].[Visible]
EXPRESSION: No


where OpenMkt is the name of the label (which is a line of text). I have
tried calling the macro from the ON FORMAT of the group header's property,
and have also tried it on the ON PRINT. It doesn't work in either case. Any
ideas what I'm missing. Thanks so much in advance.
 
Louise,

I would expect this macro to work on the Format event of the group
header section. Except you don't need to specify the report, in other
words, in the Item argument of the SetValue macro, put like this
[OpenMkt].[Visible]

Just check to see that the OpenMkt isn't associated with any other
control, e.g. that it doesn't have an attached textbox.
 
Still not working. Have used before in the detail section and worked fine.
Are there any label properties I need to be concerned with? In the properties
for this label I have Visible set to Yes. The macro is on the Format event of
the group header section, and I removed the report name from the Item as you
suggested. Any other thoughts?
Thanks ahead.
Louise

Steve Schapel said:
Louise,

I would expect this macro to work on the Format event of the group
header section. Except you don't need to specify the report, in other
words, in the Item argument of the SetValue macro, put like this
[OpenMkt].[Visible]

Just check to see that the OpenMkt isn't associated with any other
control, e.g. that it doesn't have an attached textbox.

--
Steve Schapel, Microsoft Access MVP
Yes, it is. The gsaflag field is also in the group header. Thank you for
your response.
Louise
 
Louise,

As regards the value of the [gsaflag] that you are using in the macro
Condition, what are the other potential values that can be entered in
this field? I think you have made a mistake in the second Condition
statement being:
[gsaflag]<="OM"
This *includes* the case of [gsaflag]="OM" and so the action of the
first SetValue (where the condition is [gsaflag]="OM") will be
over-ridden. Not only that, but you do not cater to the case of
[gsaflag]>"OM". So it seems to me that maybe what you meant was:
[gsaflag]<>"OM"
 
Back
Top