Results 1 to 5 of 5
  1. #1
    2 Star Lounger
    Join Date
    May 2002
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calculating Field in Access (Access 2002)

    I'm trying to create a calculating field that subtracts one field from another and I'm trying to do it in Table Design view but don't seem to have any luck. I know it can be done by using a query but, if that's done, how can one get the calculated query result to appear in the original table? Thanks in advance for any info.

  2. #2
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Calculating Field in Access (Access 2002)

    Why would you want to?
    The query is the place for calculated fields. You would use the query as a source of any form or report, however, if you use the table as the source of the form or report than you can just calculate the fields here as well.
    Pat <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  3. #3
    2 Star Lounger
    Join Date
    May 2002
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calculating Field in Access (Access 2002)

    Thanks Patt: I'm just curious as to why Access won't allow calculated fields in a table. Only if I run an Update query will the table update. I thought there would be an easier way.

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Calculating Field in Access (Access 2002)

    This isn't a behavior unique to Access. Most modern relational databases won't let you store calculated data in a table. The idea is that values may change and invalidate the calculated data, so why store it to begin with. On the other hand a query can always calculate it on the fly, and queries can be used in nearly all instances where you would use a table. There are occasional situation where you need to create data for a report and save it for historical purposes. In that case a Make Table query will do the trick - it creates a new table and it can store calculated values, but once they are stored they are static, so if someone alters the value of one of the inputs to the calculation, the calculated value won't change. Hope this clears things up a bit.
    Wendell

  5. #5
    2 Star Lounger
    Join Date
    May 2002
    Posts
    113
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Calculating Field in Access (Access 2002)

    Thanks Wendell: That clears it up with a great explanation. Appreciate that!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •