If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How can I insert a calculated field from FORMS to a REPORT?
Hello,
Say I create a table with three fields and label them a, b and c. I then create a form where the user inputs a number for a and b. The c field then calculates the sum (i.e. a + b = c ) This works fine. Here comes the problem. When I create a report, and input all three fields into the detail section of the report, the only visual numbers that appear are a and b. The value of c is always zero. What am I doing wrong? Would very much appreciate the help. Thanks Sean |
#2
|
|||
|
|||
How can I insert a calculated field from FORMS to a REPORT?
On Wed, 9 May 2007 12:36:01 -0700, sean wrote:
Hello, Say I create a table with three fields and label them a, b and c. I then create a form where the user inputs a number for a and b. The c field then calculates the sum (i.e. a + b = c ) This works fine. Here comes the problem. When I create a report, and input all three fields into the detail section of the report, the only visual numbers that appear are a and b. The value of c is always zero. What am I doing wrong? Would very much appreciate the help. Thanks Sean 1) Calculated fields should not be saved to a table. Anytime you need the result of a calculation, re-calculate it. So... you can delete field C from the table. Also, it would of benefit you to differentiate between a Field (which is the place in a table that stores data) and a Control (which is an object on a form or report that displays or calculates data. Tables contain Fields. Forms and Reports contain Controls. 2) The easiest way is to just repeat the calculation on the report using an unbound text control: = a + b 3) If the calculation has been done on a form AND THE FORM IS OPEN, you can refer, using an unbound control on the report, to the control on the open form: = forms!FormName!ControlName -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#3
|
|||
|
|||
How can I insert a calculated field from FORMS to a REPORT?
sean wrote:
Say I create a table with three fields and label them a, b and c. I then create a form where the user inputs a number for a and b. The c field then calculates the sum (i.e. a + b = c ) This works fine. Here comes the problem. When I create a report, and input all three fields into the detail section of the report, the only visual numbers that appear are a and b. The value of c is always zero. What am I doing wrong? The c fiels should NOT be in the table. The report should perform the same calculation as the form. -- Marsh MVP [MS Access] |
Thread Tools | |
Display Modes | |
|
|