Results 1 to 6 of 6
  1. #1
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162

    Calculating in Tables

    I have in my Table a simple calculation Fields are 'Income1' 'Exp1' 'Bal1'

    In the table under Bal1 it

    [Income1]-[Exp1] and that give me a result

    There are 8 such lines so there is Income2, Exp2 Bal2 and so on

    This works fine

    However when I create a form if the second set has no entry it doesn't calculate the the totals at the bottom, i have to add 0 to each field so it shows the total

    Try using the Nz faction but you cant do this in the tables

    Any ideas? or should i not have cal in the tables?



    Thanks

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Calculated fields in tables may have a benefit if you are accessing the DB over the internet.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    What do you mean you have '8 such lines'? If you have multiple similar name fields, this indicates a non-normalized structure and will probably cause problems.

    No record should have both income and expense data so this is also not a normalized data structure, however, this one can probably be worked with easily enough.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162
    Quote Originally Posted by June7 View Post
    What do you mean you have '8 such lines'? If you have multiple similar name fields, this indicates a non-normalized structure and will probably cause problems.

    No record should have both income and expense data so this is also not a normalized data structure, however, this one can probably be worked with easily enough.

    There are 8 fields of income, exp and bal

    all named Inc1, Inc2, Inc3 up to 8 then 8 expenses, exp1, exp2, exp3 up to 8 and then the calculation field for each inc and exp

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    My comments still apply.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162
    Got what you were saying and changed the structure of the table and now works fine

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

Similar Threads

  1. Calculating in Forms
    By undee69 in forum Forms
    Replies: 3
    Last Post: 12-08-2012, 06:24 AM
  2. calculating
    By cade1980 in forum Access
    Replies: 3
    Last Post: 04-17-2012, 10:42 PM
  3. Calculating Age
    By Koyangie in forum Queries
    Replies: 2
    Last Post: 04-05-2012, 03:11 PM
  4. Calculating Age from DOB
    By coolpal9 in forum Forms
    Replies: 15
    Last Post: 01-12-2012, 05:26 AM
  5. Calculating a sum on a report
    By missourijc in forum Reports
    Replies: 0
    Last Post: 10-30-2008, 07:21 PM

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