Function in Table

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

Guest

I have a question, can you set up a table to automatically add or subtract
two fields in that table. I have two currency values and I want the one to
subtract the one value from the other if it is higher than the one and if it
is not then I want it to add. Is there anyway that it can happen, please let
me know. Thanks
 
In a word: No.

However you can do this in a query, form, or report as needed. That's
usually the best way to handle this.
 
Fields in tables cannot contain functions. Moreover, it's generally not
recommended to store calculated values in tables.

Create a query, and put a computed field in that query:

MaxValue: IIf(Nz([Field1], 0) > Nz([Field2], 0), Nz([Field1], 0), [Field2])

Use the query wherever you would otherwise have used the table.
 

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