Share via

2007 Access-Table add subtract fields

Anonymous
2016-06-09T20:24:21+00:00

I have 3 column, one is amount, second is paid, third is balance,

I'm trying to get third field to subtract the first two. ya know like in excel when its easy. I didn't think It would be this difficult. no I don't know anything about coding

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

6 answers

Sort by: Most helpful
  1. Anonymous
    2016-06-10T20:52:09+00:00

    I need a formula or code or expression or something that I can't figure out how to write, the expression builder isn't working or I don't know how to use it.

    What Tom posted was an example of SQL 'code' of a query.  

    In query Design View place your table in the space above the grid and click on the fields and drag to the field row of the grid.

    Click on the VIEW icon and select SQL View.   At the end of the SELECT statement shown enter --

    a comma and then       [amount]-[paid] as balance

    Save the query.    Run the query.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. ScottGem 68,830 Reputation points Volunteer Moderator
    2016-06-10T01:28:14+00:00

    As Karl said, as a general rule we don't store calculated values. Does your table only have those three columns? I would think it would need more.

    What does your app do?

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  3. Anonymous
    2016-06-09T20:53:12+00:00

    Access tables are not Excel spreadsheets.   Do the math in a query, form or report.

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  4. Anonymous
    2016-06-10T13:50:47+00:00

    I understand its not excel. its completely different.

    I need a formula or code or expression or something that I can't figure out how to write, the expression builder isn't working or I don't know how to use it. i've gotten really far in this ginormous project, but a few thing I cant write the code for.

    Was this answer helpful?

    0 comments No comments
  5. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2016-06-10T01:41:38+00:00

    Use a query; something like:

    select amount, paid, amount-paid as balance

    from yourTable

    Was this answer helpful?

    0 comments No comments