Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2009
    Posts
    3

    Sum of two field names in one record in the same table.

    The subject basically sums it up. I am trying to figure out how to take one field and add it to two other fields and then put the total in a third field, I need to do this within the same record in a table entry.

    I can do it with a query but I am trying to do it in the table view so I can see data from a whole screen of records instead of one at a time.

    It is a inventory DB, each inventory item needs to have purchase price, tax, shipping, and then a total of the three so I can see the total cost for the item. I know I can manually enter it but I would rather avoid the human error aspect and make it easier to manage.

    Does anyone know of a way to do this? I tried writing some expressions in the Validation Rule area but I keep getting a error.

    I tried
    =[field1]+[field2]
    SUM([field1]+[field2])

    I'm not sure if I am just using the wrong expressions or just doing it the wrong way.

    Thanks,

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    When you view a query in Datasheet mode, you see all of the records. What's wrong with that? This is best done in a query which you said you can do.

  3. #3
    Join Date
    Mar 2009
    Posts
    3
    Sorry, I meant in a form. I see what your saying about the query, that should work fine like that.

    Would I set that up the same way as you would in a form? Thanks.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    A form has a Datasheet mode too you know. You've got me somewhat confused. In a query you would create a new field with:
    SumField: [Field1] + [Field2]
    ...using your field names of course.

  5. #5
    Join Date
    Mar 2009
    Posts
    3
    Cool, I'll try it with SumField and see how that works. I had to leave earlier so I only had a few minutes to play with it, I'm not real familiar with queries and forms so I am learning as I go.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Understood. Someone will be around to assist if you need it.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 02-26-2009, 11:31 AM
  2. Replies: 3
    Last Post: 02-20-2009, 02:28 PM
  3. Quick way to stuff field names into text field
    By kfinpgh in forum Programming
    Replies: 0
    Last Post: 01-04-2007, 01:13 PM
  4. How to extract names from 1 large field
    By Tepin in forum Access
    Replies: 1
    Last Post: 12-04-2006, 01:14 PM
  5. Replies: 9
    Last Post: 07-21-2006, 05:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums