Hiding labels

B

Bart Schelkens

Hi,

I hope you can help me.

I have this report.
In the header of my report I have some labels in dutch and some in french.
I want to display either the dutch labels or the french labels depending on
a value in my database.

I can't seem to get it working.

Thx
 
J

Jim/Chris

Place the determining "value" in your database on the form.
You can hide it if you want.

Use some code in the Format event of the section
containing the controls:

If [Forms]![NameOfForm]![value] = "XXXXX' Then
Me.dutchlabel.Visible = False
Me.frenchlabel.Visible = True
Else
Me.dutchlabel.Visible = True
Me.frenchlabel.Visible = False
End If

Jim
 
B

Bart Schelkens

I tried it, but it didn't work.
Probably because I'm trying to do that in a report and not in a form.

Jim/Chris said:
Place the determining "value" in your database on the form.
You can hide it if you want.

Use some code in the Format event of the section
containing the controls:

If [Forms]![NameOfForm]![value] = "XXXXX' Then
Me.dutchlabel.Visible = False
Me.frenchlabel.Visible = True
Else
Me.dutchlabel.Visible = True
Me.frenchlabel.Visible = False
End If

Jim

-----Original Message-----
Hi,

I hope you can help me.

I have this report.
In the header of my report I have some labels in dutch and some in french.
I want to display either the dutch labels or the french labels depending on
a value in my database.

I can't seem to get it working.

Thx


.
 
J

Jeff Boyce

Another approach might be to use different captions in single labels. You
would use similar code, still in the Format event for the section containing
the labels. That would take up less real estate...
 
Top