Results 1 to 2 of 2
  1. #1
    brs's Avatar
    brs is offline Novice
    Windows 8 Access 2010 64bit
    Join Date
    Mar 2014
    Posts
    17

    insert calculated values in a table field

    hi,



    i have a subform which contains a lot of calculated values. fields which calculate values are located both in master form and subform. i use those calculated values in various reports where i have to insert formulas again. so i have decided to insert calculated values in table directly. i can use update query but i am unsure how to trigger it; and how to keep fields updated everytime a value is changed.

    main form fields = [gsm] , [rate]

    sub form fields = [pages], [qty], [gsm]*[rate]*[pages]*[qty]

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Possibility of saved calculated value getting 'out of sync' with raw data is why it is not usually a good idea to save calculated values.

    Figuring which event(s) to use is the real trick.

    Perhaps the subform BeforeUpdate event.

    Me.calcfieldname = Forms!Main.[gsm] * Forms!Main.[rate] * [pages] * [qty]
    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.

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

Similar Threads

  1. Insert new calculated field
    By endri81 in forum Queries
    Replies: 1
    Last Post: 01-19-2013, 03:44 PM
  2. Replies: 11
    Last Post: 10-18-2012, 02:23 PM
  3. Replies: 4
    Last Post: 01-04-2012, 02:35 PM
  4. Replies: 2
    Last Post: 09-06-2011, 05:44 PM
  5. CrossTab - insert a calculated field
    By weiguo.shi in forum Queries
    Replies: 10
    Last Post: 05-23-2011, 01:20 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