Results 1 to 7 of 7
  1. #1
    JRT2006 is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    7

    Avg a column of unbound text boxes

    I know doing calculations in a form is frowned upon, unfortunately thats the only information I've found upon hours of searching.



    In my case, i think it is necessary.

    As you can see, I have a subform here that does calculations to find the value of a skill. I need the average of the column to generate so i can have a "Final Value" of the prospect, then I need to store the value somehwere so a report can be generated of each prospect and their final value.
    Help please...
    Attached is my database for further informationDatabase8 (2).zip

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    No, not necessary to do this calc on form.

    Cannot use aggregate functions on textbox, period, must reference fields of RecordSource.

    =Avg([GradeAvg] * [SkillValueID])

    If you do the [GradeAvg] * [SkillValueID] calc in form/report RecordSource and name the constructed field like SkillRating, then on form/report:

    =Avg([SkillRating])

    Should not have to save this calculated value. Calculate on report. Use report Sorting & Grouping feature with aggregate calcs in group and report footers.
    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.

  3. #3
    JRT2006 is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    7
    Okay, i think I understand what you mean. Are you saying if I reference a record source as a calculation on a form, as your example =Avg([GradeAvg]*[SkillValueID]), to get a value I DO NOT need to save that to a table, but I can still have it appear on a report in which i can sort from highest to lowest?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    SHOULD NOT save to table. This is simple calc and can easily be replicated in report design.

    You want to sort on the calculated value - not sure about that.
    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.

  5. #5
    JRT2006 is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    7
    Quote Originally Posted by June7 View Post
    SHOULD NOT save to table. This is simple calc and can easily be replicated in report design.

    You want to sort on the calculated value - not sure about that.
    I'm trying to keep the numbers on the report to a minimum. If i have to do the calculations on the report, don't all of the skill values and grades have to be on there as well?

    I'd prefer the report to be as follows:

    Code:
    Prospect Name1 | Position | Height | Weight | College | Round | Finale Value(this would be the =Avg([GradeAvg]*[SkillValueID])
    Prospect Name2 | Position | Height | Weight | College | Round | Finale Value
    Prospect Name3 | Position | Height | Weight | College | Round | Finale Value
    and each prospect to be listed in a row as that.

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    That can be done in report design.

    Or build an aggregate (GROUP BY) Totals query and use that as the report RecordSource.
    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.

  7. #7
    JRT2006 is offline Novice
    Windows 8 Access 2013
    Join Date
    Apr 2015
    Posts
    7
    Quote Originally Posted by June7 View Post
    That can be done in report design.

    Or build an aggregate (GROUP BY) Totals query and use that as the report RecordSource.
    awesome, thanks a lot for your help

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

Similar Threads

  1. Compare dates in 2 unbound text boxes
    By Bosworth in forum Access
    Replies: 3
    Last Post: 02-21-2015, 10:41 AM
  2. Replies: 3
    Last Post: 12-17-2013, 05:14 AM
  3. Replies: 4
    Last Post: 08-14-2012, 10:33 AM
  4. Using Unbound text boxes
    By rbiggs in forum Reports
    Replies: 4
    Last Post: 08-16-2011, 04:05 PM
  5. Unbound Text boxes
    By kyleg222 in forum Forms
    Replies: 2
    Last Post: 08-02-2011, 12:53 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