Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I have a calculation that was reall

Status
Not open for further replies.

Harr777

Programmer
Sep 25, 2003
71
US
I have a calculation that was really very complicated, so complicated that I could only get the calculation through running a certian report.
I am using that much needed value in a secondary report. The problem that I have is that you have to manually go to the end of the first report before that value (in the report footer) is determend.
I want to automate the process so that the first report runs, goes to the end(not visible) and then run the other report using the needed value.
I will be extremely greatful to someone with a solution.
 
I am guessing the user does not have to go to the report end as the control is hidden. If it is not in the page header/footer you may be able to use the OnRetreat event to open the new report in which you will have your query or whatever you are using reference the other report (should still be open). (Or maybe have a form open in hidden mode to store the value - although I am sure there would be a better way to handle this in VBA).

I haven't tried this - just a thought.
 
I'm going to try putting the first report in a non-visible continous form and get a value from the end of it.
I think that you might have to see the report in order to see what I mean about not figuring out a way to do it in a query. I tried stretch what can be done using queries and ran into a couple of dead ends.
In a nut shell, I'm adding a value from a group and testing wether that value is higher or lower that an allowance. I then need to get all of net total of those values from the groups and the total of only the positive values (something that I'm not sure if it's possible).Then, I have to add all of the positive values and compare it to the total of allowances. Then, if the total positive value exceeds the allowance, divide the net value by the positive value.
I wouldn't blame you if that makes your head spin.
ALSO, I have to do this whole thing for four difference types of objects.
It seems like it it might be possible through a series of queries. I'm not sure if there is a limit on how many queries you can chain together.
The porpose of the final report is for a reconciliation. The benefit of deriving the value from a report( or form) is that, if you wanted to set it to visible, you can follow that flow.
Sorry if this turned into a book.
Harr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top