Blank field in Table but not Form

S

Sterdog

I have a field in my Form that calculates "Income". It is not appearing in
the Table, all other Form fields are populating over but not the "calculated"
ones.

Anyone know why?
 
V

Van T. Dinh

.... and that how it should be: Calculated value should generally be
re-calculated whenever needed it and not stored in the Table.

While it is possible to store calculated values in the Table, the Relational
Database Design Theory does not recommend this because this will introduce
the potential for inconsistencies in data stored in the database, e.g. a
component value is changed and the calculated value is not re-calculated and
updated into the Table.
 
A

Al Camp

Sterdog,
Because they are "calculated" fields and not "bound" to any field in your
table. The ControlSource of those fields are formulas, so Access has no way
to associate the calculated value with any specific field.
But... the larger issue is that calculated values are not saved.

For example, Price * Qty = LineTotal. Price and Qty are bound to table
fields, and saved, but Line Total is not. Since you've saved Price and Qty,
you can always "re-derive" the LineTotal in any subsequent query, report, or
form by placing a calculated unbound field with =Price*Qty in the
ControlSource.

Use calculated "unbound" fields for display purposes, but don't store
them.
 
S

Sterdog

Thanks guys: BUT how do create a report for calculated fields? I hope I
didn't do all those calculations in the form for nothing?!!
 
V

Van T. Dinh

If you can crerate a Calculated Value in the Form, you can create the same
value in the Report, right?

In the Report, you can either do the calculations in the Query / SQL being
used as the RecordSource for the Report or you can place the required
expression in a Calculated Control on the Report (depending on the
calculations you need).
 
S

Sterdog

Van,
I tried to copy the form's expression and copy into the corresponding
report's field and the value was incorrect???

Since I have a very basic database, is there an easier way to get the
results to "write" to a table?
 
V

Van T. Dinh

Sorry, I don't advise people to do things that I consider incorrect and I
don't do it myself.

Post the details of relevant Table(s), the SQL of the RecordSource for the
Form, the expression you used in the Calculated Control on the Form, the SQL
of the RecordSource for the Report and the expression you attempted to use
in the Report.
 
S

Sterdog

Ok,
I went back and queried all the fields in the table and entered in the
appropriate expressions. I then used that query to build a report.
Success!!! I am really good with Excel but this is the first time doing
anything with Access.

Is there a way I can past in the formatting from a previously made excel
sheet and fill certain cells with cells from the report?
 
V

Van T. Dinh

Sorry, I don't know for sure but the Excel & Access formatting are
substantially different.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top