subreport field on main report

colmtourque

Registered User.
Local time
Today, 18:01
Joined
Sep 26, 2002
Messages
83
I am attempting to get a value from a subreport to a main report.
Using the expression builder I have set the value on the main report to equal the value in the subreport.
But all I get is the last value from the field but not the next dozen. Any clues on how to fix this. I have searched the forums and it appears I am doing everyting right.
 
Last edited:
I'm not sure what you mean by "the next dozen". How many values are you trying to display on the main report? Is it one or many different values?
 
More than one value, but all from the same field
 
OK I am not sure I understand that at all. I looked up DSum and DLookup and got the syntax, but how would you tell it to still lookup based on the id number you are on.

But I got another way to possibly do this within a query. But here is my question.
The query it appears will probably take a year to run, and then after I run it on the report with all the other queries I am imagining just how long it will take to run.

Is there a better way to possibly do this, add two values from a subform. Or is it possible that my entire setup on the table side is wrong?

I know the obvious answer is that you should just build a query that does this and use joins but I have built this query but it pretty much requeries ambigious joins. Instead I need to build for loops basically to make this work, and I have no clue how to code that outside of asp or php.

This is the whole problem.
My people get two sets of charges, one variable and the other fixed at two different times in the month. The fixed charges are the same everymonth and automated within the database. The variable change and could include any number of things and they could rack up 20 (say the send mail every day they are charged for that, each day).
So I have two tables one [fixed] that gets just one charge entry per agent per charge each month (there are 4-5 charge fields) and one crosstab query [variable] built off of a 6-7 different variable charge tables.
both joined to a [name] table (the primary table off which the whole database is built) based off the field [id number].
An agent in the name table might not have a fixed or variable charge every month (though most have a fixed). So if I do a query that links [fixed] and [variable] my best result only gets the months where both have entries but not where an agent gets only fixed but no variable (or vice versa).
Pat you tried to help me with this in the past but the joins just got me the above result and I am just trying to tackle this problem from another angle.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom