如何更改SubReport中的RowSource [英] How to change the RowSource in a SubReport

查看:61
本文介绍了如何更改SubReport中的RowSource的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的读者,


用于更改主报告的RowSource的VBA代码的语法是:


Me.RowSource = TableOrQueryName


但是现在改变SubReport的RowSource的语法:


我认为它必须是这样的:


Reports.MasterReportName.SubReportName.RowSource =

" TableOrQueryName"


但这不起作用。


这有什么工作语法吗?


坦克可以提供任何帮助。


种类问候,


Simon

Dear reader,

The syntax for the VBA code to change the RowSource of a Master Report is:

Me.RowSource = "TableOrQueryName"

But now the syntax to change the RowSource of a SubReport:

I think it has to be something like this:

Reports.MasterReportName.SubReportName.RowSource =
"TableOrQueryName"

But this is not working.

Is there a working syntax for this?

Tanks for any help.

Kind regards,

Simon

推荐答案

我假设你的意思是RecordSource,而不是RowSource。语法如下:


Reports!MasterReportName!SubReportControlName.Repo rt.Recordsource =

" asdfadsf"


你实际上指的是报告。子报告控件的属性,

,然后是该报告的RecordSource属性。

" Simon" < Sv ******** @ Versatel.nlwrote in message

news:47 ********************** *@news.tele2.nl ...
I assume you mean RecordSource, not RowSource. The syntax would be:

Reports!MasterReportName!SubReportControlName.Repo rt.Recordsource =
"asdfadsf"

You''re actually referring to the "Report" property of the subreport control,
and then the RecordSource property of that report.
"Simon" <Sv********@Versatel.nlwrote in message
news:47***********************@news.tele2.nl...

亲爱的读者,


更改VBA代码的语法Master Report的RowSource是:


Me.RowSource =" TableOrQueryName"


但是现在更改SubReport的RowSource的语法:


我认为它必须是这样的:


Reports.MasterReportName.SubReportName.RowSource =

TableOrQueryName


但这不起作用。


这是否有一个有效的语法?

坦克提供任何帮助。


亲切问候,


西蒙

Dear reader,

The syntax for the VBA code to change the RowSource of a Master Report is:

Me.RowSource = "TableOrQueryName"

But now the syntax to change the RowSource of a SubReport:

I think it has to be something like this:

Reports.MasterReportName.SubReportName.RowSource =
"TableOrQueryName"

But this is not working.

Is there a working syntax for this?

Tanks for any help.

Kind regards,

Simon



" Simon" < Sv ******** @ Versatel.nlwrote in message

news:47 ********************** *@news.tele2.nl ...
"Simon" <Sv********@Versatel.nlwrote in message
news:47***********************@news.tele2.nl...

亲爱的读者,


更改VBA代码的语法Master Report的RowSource是:


Me.RowSource =" TableOrQueryName"


但是现在更改SubReport的RowSource的语法:


我认为它必须是这样的:


Reports.MasterReportName.SubReportName.RowSource =

TableOrQueryName


但这不起作用。


这是否有一个有效的语法?

坦克可以提供任何帮助。


亲切的问候,


Simon
Dear reader,

The syntax for the VBA code to change the RowSource of a Master Report is:

Me.RowSource = "TableOrQueryName"

But now the syntax to change the RowSource of a SubReport:

I think it has to be something like this:

Reports.MasterReportName.SubReportName.RowSource =
"TableOrQueryName"

But this is not working.

Is there a working syntax for this?

Tanks for any help.

Kind regards,

Simon



Reports!MasterReportName.SubReportName.Report.RowS ource =" TableOrQueryName"


注意添加单词Report。这指示Access参考

报告本身,而不是托管它的子报告控件。


Reports!MasterReportName.SubReportName.Report.RowS ource ="TableOrQueryName"

Notice the addition of the word Report. This instructs Access to refer to
the report itself, not the subreport control that ''hosts'' it.



如果我使用语法:

Reports!MasterReportName!SubReportControlName.Repo rt.Recordsource =

" asdfadsf"


我收到运行时错误''2455''

您输入的表达式对该属性的引用无效

表格/报告。


我已经多次检查了主en sub的名称

并且它们是正确的。

什么可以出错?

" Neil" < no **** @ berospt中的nospam.netschreef

新闻:QW ***************** @ newssvr19.news.prodigy.ne t ...
If I use the syntax:
Reports!MasterReportName!SubReportControlName.Repo rt.Recordsource =
"asdfadsf"

I receive the Run-time error ''2455''
You entered an expression that has an invalid reference to the property
Form/Report.

And I have checked the names of the master en sub for report several times
and they are correct.
What can by wrong?
"Neil" <no****@nospam.netschreef in bericht
news:QW*****************@newssvr19.news.prodigy.ne t...

我假设你的意思是RecordSource,而不是RowSource。语法如下:


Reports!MasterReportName!SubReportControlName.Repo rt.Recordsource =

" asdfadsf"


你实际上指的是报告。子报告的属性
I assume you mean RecordSource, not RowSource. The syntax would be:

Reports!MasterReportName!SubReportControlName.Repo rt.Recordsource =
"asdfadsf"

You''re actually referring to the "Report" property of the subreport



control,

control,


,然后是该报告的RecordSource属性。


" Simon" < Sv ******** @ Versatel.nlwrote in message

news:47 ********************** *@news.tele2.nl ...
and then the RecordSource property of that report.
"Simon" <Sv********@Versatel.nlwrote in message
news:47***********************@news.tele2.nl...

亲爱的读者,


更改VBA代码的语法主报告的RowSource
Dear reader,

The syntax for the VBA code to change the RowSource of a Master Report



是:

is:



Me.RowSource =" TableOrQueryName"


但是现在更改SubReport的RowSource的语法:


I认为必须是这样的:


Reports.MasterReportName.SubReportName.RowSource =

" TableOrQueryName"


但这不起作用。


这是否有一个有效的语法?


坦克可以提供任何帮助。


亲切的问候,


Simon

Me.RowSource = "TableOrQueryName"

But now the syntax to change the RowSource of a SubReport:

I think it has to be something like this:

Reports.MasterReportName.SubReportName.RowSource =
"TableOrQueryName"

But this is not working.

Is there a working syntax for this?

Tanks for any help.

Kind regards,

Simon




这篇关于如何更改SubReport中的RowSource的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆