refer to control in subform in subform

H

Henrootje

I have a dream!

But I also have a report.......

That report has a subreport with a subreport. With the following code
I change the caption of a label.

dim d as string
d = "hello world"
Reports!rpt_CG_Creditgeld!rpt_CG_SubRapportComp!Sub362!lbl1.Caption =
d

Now I want to do the same thing, using the same reports, but the only
difference is the mainreport:

it is called rpt_CG_Creditgeld_CL instead of rpt_CG_Creditgeld

But where
Reports!rpt_CG_Creditgeld!rpt_CG_SubRapportComp!Sub362!lbl1.Caption =
d
works,
Reports!rpt_CG_Creditgeld_CL!rpt_CG_SubRapportComp!Sub362!lbl1.Caption
= d
does not...............
Any of these reports are open at the same time, what might be causing
the Error 2455 ?
AFAIK that means something wrong in the syntax or spelling of the
referral but I can not find it?

Any of you has any ideas?
 
A

Arvin Meyer [MVP]

The syntax is:

A = Main report
B = subreport
C = nested subreport (in B)

Reports!A!B.Report!C.Report!LabelName = "Whatever"

adding extra spaces for clarity:

Reports ! A ! B . Report ! C . Report ! LabelName = "Whatever"
 
H

Henrootje

Arvin,

I had found the right syntax but apparantly things will not work if
you mix reports and forms.........................

I saved the subforms as reports and using your syntax things started
working!

Thnx for thinking

Henro
 

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