Results 1 to 4 of 4
  1. #1
    ldumas777 is offline Novice
    Windows Vista Access 2003
    Join Date
    Jan 2012
    Posts
    2

    Need results of calculated field to appear in table

    This question concerns a calculated field on frmNCC. At the request of the dbase users, they wanted this form as part in Access instead of in Excel where it belongs. So I slaved over the myriad calculations and came up with a beautiful, perfectly functioning form... UNTIL... I remembered that I need to be have that total field [TotalNCCCost] in tblNCC because it needs to be downloaded into a spreadsheet.



    Assumptions and attempts: I assume I need to create a field in tblNCC called TotalNCCCost and make that the control source for this field. And I tried that. I then moved the calculation into the AfterUpdate of the form. This caused conflict with the Me.Recalc expressions. I tried deleting the Me.Recalcs and the form ceased to function.

    I am at a loss and I am under a serious time crunch. They want to go live with this puppy next week. I would greatly appreciate any help you have to offer. I am an Access novice -- especially when it comes to VBA -- so please be as explicit as possible with your advice. Thank you.


    Nonconformance dBase no data.zip
    I've attached a copy of the file without data for confidentiality reasons.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    I don't see the need to save the calculation, as you can simply export a query to Excel that has a calculated field. If you still want to save it:

    http://allenbrowne.com/casu-14.html

    Noting the second section and using the after update event of the controls, not the form.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    ldumas777 is offline Novice
    Windows Vista Access 2003
    Join Date
    Jan 2012
    Posts
    2
    Quote Originally Posted by pbaldy View Post
    I don't see the need to save the calculation, as you can simply export a query to Excel that has a calculated field. If you still want to save it:

    http://allenbrowne.com/casu-14.html

    Noting the second section and using the after update event of the controls, not the form.

    Except that the calculated field I want to save is based on other calculated fields that are themselved not stored in the query. You wouldn't think it would be so blanged hard to get one little field to update.

    It's been suggested that after each of my Me.Recalc statements I add in tblNCC[TotalNCCCost] = frmNCC[TotalNCCCost]. I'm going to take a deep breath a try. Then after that, I'll probably find a dark corner to weep.

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The db reflects "spreadsheet thinking". In a normalized relational database, all the stuff in your "Support Personnel" area would be in a related table, and that would be a subform. The related table would have fields for the qty, hours, rate plus one for the type (line operator, line leader, etc). There would be a record in that table for each type used for a project, and the table would be related to the main table by the ID field. There would also be a "Types" table listing all the available types. With that design, nothing really changes when you get a new type like "Widget operators", you just add a record to the Types table. In your design, everything has to be modified.

    Then a simple Sum function on a form gets you your total.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Calculated Field in a table 2010
    By JMac in forum Programming
    Replies: 5
    Last Post: 05-07-2012, 05:49 PM
  2. Replies: 3
    Last Post: 03-03-2012, 10:39 PM
  3. Calculated field for table not form
    By cheyanne in forum Access
    Replies: 1
    Last Post: 01-27-2012, 07:29 AM
  4. Replies: 1
    Last Post: 02-05-2009, 04:53 PM
  5. Update table from calculated field in a form
    By BernardKane in forum Forms
    Replies: 3
    Last Post: 11-28-2006, 09:48 AM

Tags for this Thread

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