Making invisible some information on a report

  • Thread starter Thread starter Arlindo Fragoso
  • Start date Start date
A

Arlindo Fragoso

Hi!

I'm a newbie and I've a report, from a query, that show me data from five
fields: A, B, C, D and E. I want to hide/not show the information of the
controls B and C based on a criteria from control A. It's that possible with
some code?

TIA
A. Fragoso
 
Hi!

I'm a newbie and I've a report, from a query, that show me data from five
fields: A, B, C, D and E. I want to hide/not show the information of the
controls B and C based on a criteria from control A. It's that possible with
some code?

TIA
A. Fragoso

In the Report Detail Section Format event:
[ControlB].Visible = Not [ControlA] = SomeCriteria
[ControlC].Visible = Not [ControlA] = SomeCriteria
 
Virus Database: 431 - Release Date: 27-04-2004
In the Report Detail Section Format event:
[ControlB].Visible = Not [ControlA] = SomeCriteria
[ControlC].Visible = Not [ControlA] = SomeCriteria

Hi!

I've tryed this code

Private Sub Detalhe_Format(Cancel As Integer, FormatCount As Integer)
[Hour].Visible = Not [Service] = Vigilante
[Discipline].Visible = Not [Service] = Juri
End Sub

But with no sucess...
....any sugestion?

I'm a neeeeeeeeeewby :-((
AF
 
Virus Database: 431 - Release Date: 27-04-2004
In the Report Detail Section Format event:
[ControlB].Visible = Not [ControlA] = SomeCriteria
[ControlC].Visible = Not [ControlA] = SomeCriteria

Hi!

I've tryed this code

Private Sub Detalhe_Format(Cancel As Integer, FormatCount As Integer)
[Hour].Visible = Not [Service] = Vigilante
[Discipline].Visible = Not [Service] = Juri
End Sub

But with no sucess...
...any sugestion?

I'm a neeeeeeeeeewby :-((
AF

What are Vigilante and Juri?
Are they Field names (in which case your criteria is that the value in
[Service] should equal the value in [Vigilante]), or are they the
actual [Service] text value you are looking for?
If they are the text values that may be in the field [Service], you
must enclose them within quotes:
[Hour].Visible = Not [Service] = "Vigilante"
[Discipline].Visible = Not [Service] = "Juri"

Using the above, [Hour] and [Discipline] will be visible at all times
EXCEPT when the value of [Service] is "Vigilante' or "Juri".

Also... Hour is an Access/VBA reserved word and should not be used as
a field name.
See the appropriate Microsoft KnowledgeBase article for your version
of Access:

109312 'Reserved Words in Microsoft Access'
209187 'Acc2000: 'Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
 
Virus Database: 431 - Release Date: 27-04-2004
In the Report Detail Section Format event:
[ControlB].Visible = Not [ControlA] = SomeCriteria
[ControlC].Visible = Not [ControlA] = SomeCriteria

Hi!

I've tryed this code

Private Sub Detalhe_Format(Cancel As Integer, FormatCount As Integer)
[Hour].Visible = Not [Service] = Vigilante
[Discipline].Visible = Not [Service] = Juri
End Sub

But with no sucess...
...any sugestion?

I'm a neeeeeeeeeewby :-((
AF

What are Vigilante and Juri?
Are they Field names (in which case your criteria is that the value in
[Service] should equal the value in [Vigilante]), or are they the
actual [Service] text value you are looking for?
If they are the text values that may be in the field [Service], you
must enclose them within quotes:
[Hour].Visible = Not [Service] = "Vigilante"
[Discipline].Visible = Not [Service] = "Juri"

Using the above, [Hour] and [Discipline] will be visible at all times
EXCEPT when the value of [Service] is "Vigilante' or "Juri".

Also... Hour is an Access/VBA reserved word and should not be used as
a field name.
See the appropriate Microsoft KnowledgeBase article for your version
of Access:

109312 'Reserved Words in Microsoft Access'
209187 'Acc2000: 'Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'

My mistake....
Hour is not a reserved word. But I would suggest you take a look at
the articles anyway.
 
It's work!!
What are Vigilante and Juri?
Are they Field names (in which case your criteria is that the value in
[Service] should equal the value in [Vigilante]), or are they the
actual [Service] text value you are looking for?
If they are the text values that may be in the field [Service], you
must enclose them within quotes:
[Hour].Visible = Not [Service] = "Vigilante"
[Discipline].Visible = Not [Service] = "Juri"

Using the above, [Hour] and [Discipline] will be visible at all times
EXCEPT when the value of [Service] is "Vigilante' or "Juri".
You must excuse me and my poor english. In fact they are "text values"...
Thank you Fred.

Best regards,
AF
 
Back
Top