Formulas

  • Thread starter Thread starter Sarah
  • Start date Start date
S

Sarah

Can anyone help me, I setting up a database in access and
would like to put formulas in like you can in excel. Can
you do this and how.

Thanks
 
Yo'll have to tell us what you want to do.

If you are trying to pull a report and multiply two fields, for example, you
can do so in the quesy or in the report. You would not save this calculated
value in the table.

To add a calculation to a query, just add a new column and put something
like...

NewFieldName: [SomeFieldA] * [SomeFieldB] / 2


or similar.


Give us some details.

Rick B
 
Can anyone help me, I setting up a database in access and
would like to put formulas in like you can in excel. Can
you do this and how.

Thanks

Sarah,
Don't confuse Access with Excel.
Access tables will only store data.
You cannot perform calculations in a table.

You can perform calculations in Access Queries, Forms, and Reports.
If you were storing length and width measurements, for example, you
could, in a form or a report unbound control, use:
=[LengthField] * [WidthField]
and display the resulting area.
 
Could it be possible to send back the data to a table which the data is
derived from a form?

Jessie

fredg said:
Can anyone help me, I setting up a database in access and
would like to put formulas in like you can in excel. Can
you do this and how.

Thanks

Sarah,
Don't confuse Access with Excel.
Access tables will only store data.
You cannot perform calculations in a table.

You can perform calculations in Access Queries, Forms, and Reports.
If you were storing length and width measurements, for example, you
could, in a form or a report unbound control, use:
=[LengthField] * [WidthField]
and display the resulting area.
 
Could it be possible to send back the data to a table which the data is
derived from a form?

Jessie

fredg said:
Can anyone help me, I setting up a database in access and
would like to put formulas in like you can in excel. Can
you do this and how.

Thanks

Sarah,
Don't confuse Access with Excel.
Access tables will only store data.
You cannot perform calculations in a table.

You can perform calculations in Access Queries, Forms, and Reports.
If you were storing length and width measurements, for example, you
could, in a form or a report unbound control, use:
=[LengthField] * [WidthField]
and display the resulting area.

Yes it's possible, but why would you intentionally wish to create an
incorrectly designed database.

Once again, this is not Excel.

Storing calculated data wastes memory space, time, and at some point,
will lead to incorrect values, if one of the values used in the
calculation is changed.

If you feel that you absolutely must do this, then code the Form's
BeforeUpdate event:
[FieldInTable] = Me![ControlOnForm]

[FieldInTable] is included in the form's record source.
 
Back
Top