How to pass through values from a table to Header Report

P

pabreuja

I'm working in a report with Microsoft Access 2002, based on a query. The BD
has another table with 2 fields: "Year" and "Quota of the year".

I need to put that "year" value in the page header and the "Quota" value in
the detail header.

By the VBA code, i access the table and i can get that values, but when i
try to put them in the page and detail header i receive this message:

«Run-time Error '-2147352567 (80020009)' You can't assign a value to this
object.»

How I can solve this problem?
 
D

Duane Hookom

Does "another table with 2 fields" have multiple records? If so, which record
values would you want to place in your report?
 
P

pabreuja

The "another table with 2 fields" has, at this moment, only half dozen of
registers and the field "Year" is the primary key of the table. I ask to the
user which the processing year and i search the register with this year in
that table. Then, I get an only register and so I want to place:

1-the year in one text box defined in page to header
2-and the quota of that year in one text box defined in the detail to header.

I hope that this reply has been clear.

-----------------
 
D

Duane Hookom

Can't you simply add the table to your report's record source? How do you
"ask to the user which the processing year"? Are you also filtering the
report based on the processing year? Are you using a control on a form to get
the user input?
 
P

pabreuja

It is done!
The light is on.
Who does not know, loses time and makes to lose time to the others.

I think that I cannot modify the Control Source of one Report after opened.
I tried to modify the Control Source of the Text Boxes of the Report when
already it was opened.

On the Forms that calls the Report, there are two Text Boxes, not visible,
with the values of the Processing Year and the Quota.
In the Report, are defined 2 Text Boxes for the values of Processing Year
and Quota.

What i did do now?
In the design of this Text Boxes on the Report, I have to put in those
Control Sources, the Control Sources of Text Boxes that have been defined in
the Forms that calls the Report.

It's all.

I have hope that you had understood my very bad English.
In any way, I am thankful for yours ready help.
--------------------------------
 

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