Visible = false on subform?

  • Thread starter Thread starter Harmannus
  • Start date Start date
H

Harmannus

Hallo,

How can is set visible = false for a field on a subform on a report.

Tried various codes but non works.

Report!<main>!<sub>!<field>.Visible = False

Thanx for any tips!

Regards,
Harmannus
 
How can is set visible = false for a
field on a subform on a report.
Tried various codes but non works.
Report!<main>!<sub>!<field>.Visible = False

Try this: Refer to the Form _property_ of the Subform Control:

Reports!<main>!<subreportcontrol>.Form!<control>.Visible = False
 
Hallo,

That doesn't work.

Tried Reports!<reportmain>!<reportsub>.Form!<fieldname>.Visible = False

Any other suggestions?

Thanx in advance for your help.

Regards,
Harmannus
 
What is <reportsub>: the name of the form that's being used as a subform, or
the name of the container for the subform on your main form? It needs to be
the latter.
 
I have never used a form as a subreoprt, but if it was being used as as
subform on a form and it was in datasheet view, you would need to set its
columnwidth to 0. It is possibly being used in datasheet view?
If so try
Reports!<main>!<subreportcontrol>.ColumnWidth = 0
 
Hallo,

Thanx for the responses!

Some confusion as to what i mean. Sorry for my bad explanation. I mean
subreport instead of subform!

I have a report with a subreport on it. I want a field on the subreport set
to visible is false based on the below choice

Select Case Forms!fdlgRapportAddress.optCriteria.Value
Case 1
Me.RecordSource = "qselAddress1"
Reports!rptAddress!rsubAddress.report!<field>.Visible = False
etc.

I nead to now the format of the line Reports!rptAddress...

Thanx for any help.

Regards,
Harmannus
 
Also,
Reports!rptAddress!rsubAddress.report!<field>.Visible = False

probably easier if you use Me instead of Reports

Me!rsubAddress.report!<control>.Visible = False

also, check your spelling by using DOT instead:

Me.rsubAddress.Report.<control>.Visible = False

also, check your control name: same words are not valid: some controls are
not named after fields.

also, what message do you get?

(david)
 
Hallo,

Thanx for the replies. The beneath works fine!

Thank you!

Regards,
Harmannus
 
Back
Top