SQL statement on Subreport

  • Thread starter Gil Lopes via AccessMonster.com
  • Start date
G

Gil Lopes via AccessMonster.com

I have a problem with a report that I' m building.

My report has no data sources. Instead, it has allready three subreports,
that feed themselves from three queries - one for each. I must say these
three subreports only contain charts.

I want to buid a fourth and fifth subreports that can pickup some specific
values fron those queries that are allready being used by some of the charts.

So, I made up this fourth subreport, which has, as data source, one query
only.
I' m tryng to insert a textbox that has the following SQL statement:

=(select [rendabertos2].[rend] from [rendabertos2] Where [rendabertos2].[data]
=forms.[consultaperiodo].[datafim])

Where:
rendabertos2 - is the query
rendabertos2.rend - is the field
rendabertos2.data - is the date
forms.consultaperiodo.datafim - is the end date selected by the user.

I wanted to retrieve from that query only the value shown on the end date for
the field "rend".
All I get is #Name?

So, I must be doing something wrong.
Can anyone help?

Regards,

Gil
 
G

Gil Lopes via AccessMonster.com

Help?

Gil said:
I have a problem with a report that I' m building.

My report has no data sources. Instead, it has allready three subreports,
that feed themselves from three queries - one for each. I must say these
three subreports only contain charts.

I want to buid a fourth and fifth subreports that can pickup some specific
values fron those queries that are allready being used by some of the charts.

So, I made up this fourth subreport, which has, as data source, one query
only.
I' m tryng to insert a textbox that has the following SQL statement:

=(select [rendabertos2].[rend] from [rendabertos2] Where [rendabertos2].[data]
=forms.[consultaperiodo].[datafim])

Where:
rendabertos2 - is the query
rendabertos2.rend - is the field
rendabertos2.data - is the date
forms.consultaperiodo.datafim - is the end date selected by the user.

I wanted to retrieve from that query only the value shown on the end date for
the field "rend".
All I get is #Name?

So, I must be doing something wrong.
Can anyone help?

Regards,

Gil
 

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