How can one store information off of reports?

R

Rocket Frog

Hello,

I have a report that creates dynamic numbers based on conditions. How do I
store these dynamic numbers so I can use them in another report? For
example, as my report is being generated, if the person is male, the number
will be changed to odd and if the person is female, the number will be
changed to even. So as my report is being generated with these dynamic
numbers, I want to be able to store them someplace so another report can use
them. How does one do this? Thanks for any help, I appreciate it.
 
R

Rocket Frog

Is there a way to use the Recordset property to do this? If so, how?

Thanks for any help.
 
A

Arvin Meyer

What you can do is save the query results which are being displayed on the
report, but any calculations made on the report itself (such as subtotals
and totals) only exist on the report and cannot be saved. If the report is
open in Preview mode, you can run code from a form which will read the
values from the report, and store them in a textbox on the form bound to a
field in the underlying table, the code on a command button might look
something like:

Sub MyButton_Click(Cancel As Integer)

Me.txtTotal = Reports!rptMyreport!txtTotal

End Sub

You can add error handling to check whether or not the report is open.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
R

Rocket Frog

Thanks for all the advice Arvin Meyer. If I had 500 dynamic numbers being
generated off of the report, would the form automatically be updated with all
of the report data or would I have to manually go to the next record and hit
the command button to have the report data transfer over to the form text
box? How can all the 500 records be updated with just one click?

I appreciate all your time and help.
Thanks,
-RF
 
A

Arvin Meyer

You would have to write code with a Loop to iterate through all the records.
Rather than doing that, I'd do the calculations in a query and not save them
at all. Unless there are enough of them to slow down a machine for long
periods of time, they can always be recalculated just as easily. The query
can also append the records if absolutely necessary.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
W

wuzhangwu126

Arvin Meyer said:
You would have to write code with a Loop to iterate through all the records.
Rather than doing that, I'd do the calculations in a query and not save them
at all. Unless there are enough of them to slow down a machine for long
periods of time, they can always be recalculated just as easily. The query
can also append the records if absolutely necessary.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

with
 
W

wuzhangwu126

Arvin Meyer said:
You would have to write code with a Loop to iterate through all the records.
Rather than doing that, I'd do the calculations in a query and not save them
at all. Unless there are enough of them to slow down a machine for long
periods of time, they can always be recalculated just as easily. The query
can also append the records if absolutely necessary.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

with
 
J

Jacqueline

You don't have to make it so complicated... just create a "Make Tabel Query"
useing the query that calculated the data. Then build your report directly
from the Table. This way, every time you run the query the table will update.

Hope this is helpful...
 
Top