Form help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have two questions/problems.

1. I have a calculation built into one of the fields on my form to calculate
cost. It is taking the info from three other fields and putting them
together for a total cost. The problem is that the cost is showing up in the
form, but not the table. The table shows zero. How can I fix this? Do I
need to put the formula in the table as well?

2. If I change the rate in my cost field, does it recalculate the values
already in the table or only for the new entries into the form?

Thanks in advance.
 
You have done the right thing by showing the calculated result on the form.
You don't need to store the result. You can see it whenever you need to
anyway. Also if you did save the result and you change one of the controls
on the form the results you had saved would be wrong.

Stick to what you have done as it is the correct approach

Hope this helps
 
Stop,

What you did is correct. Don't write the calculated values in your table. If
you do need an alternative you could place it in a query. That and only that
is the way to store calculations (in a form or query) and not in the table.
If you need the calculations for output, place them in a query. This also
makes it easier for creating reports.

hth
 
1. You cannot set the control source of the calculation field to both a Table
field and the calculation formula. Establish another field on your form that
is hidden and set the control source to the table field you are trying to
input the resulting calculated answer into. Then, use and afterupdate or
saveas function that will transfer the calculated number into the hidden
table field and effectively into your table.

Me.TableField = Me.CalculatedField

2. Only for new entries in your form. You want to use a query instead of a
table to have all the fields recalculate.

B
 
Okay, I guess I am too used to excel and having the calculations right with
the data.

I will just write the formula in when I run a query for specific data.

THanks for both replies!
 

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

Back
Top