By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,475 Members | 1,367 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,475 IT Pros & Developers. It's quick & easy.

Set Report Values to Table

P: 5
I have an Access 2003 report that has multiple calculated values.
Now I need to use one of those values in a subform. Is there a technique in
Access similar to SetValue so a
calculated report value can be transferred to a table field?
Nov 28 '08 #1
Share this Question
Share on Google+
3 Replies


DonRayner
Expert 100+
P: 489
Couldn't you just use the same formula as the control sours for the field in your subform as you do for the calculated field on your report.
Nov 28 '08 #2

P: 5
The value I need for the subform is the result of multiple expressions from the report, some of which include DSum functions. I only need the 'final result', so was hoping for an easy fix. If it was a form value, a simple 'SetValue' macro would do the trick. I was looking for something like that using a report field.
Nov 28 '08 #3

Expert Mod 2.5K+
P: 2,545
Don has pointed you in the right direction here; you really need to include sufficient calculated fields in your report's source query to allow you to replicate the result you need in your form.

It is not practicable to refer to values calculated within a report in the way you ask; reports and forms have very different purposes and generally do not co-exist in such a way that you can use values from one in the other. In contrast you can use an unbound control on a form to look up values from a query at any time (using DLookup or DSum as necessary).

It sounds to me like you have got yourself into a bit of a calculation mess here, and it is the disjoint nature of your source data calculations which is the problem. Easy fixes generally don't solve much. They simply hide the poor logic of the underlying data for a short while...

-Stewart
Nov 28 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.