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

    Adding in Subform causing an error message

    Hi have a simple =Sum([Hours]) text box in the footer of the subform and on the main page =[Billing Hours subform]![Text16] in another text box, this add all the hours completed by each employee

    Works fine

    But when I add another =sum([Total]) text box and =[Billing Hours subform]![Text20] the Total being the result of Hour*Rate (works fine in subform)



    but I get an error message in both text boxes on the main page, I am unsure why this is happening

    Many Thanks

  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,929
    Aggregate functions can only reference fields, not calculated textboxes.

    Do the Hour*Rate calculation in RecordSource then reference that constructed field.

    Or in textbox:

    =Sum([Hour] * [Rate])
    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
    keiath is offline Competent Performer
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    162
    Thanks yeah rates of each emp is different so its not a simple hour*rate so will need to query

    Thanks again

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

Similar Threads

  1. SubForm Causing Duplicates?
    By Adam7 in forum Forms
    Replies: 5
    Last Post: 11-21-2012, 09:40 AM
  2. Query Criteria Causing Data Mismatch Error
    By jrubenol in forum Queries
    Replies: 2
    Last Post: 09-14-2011, 09:34 AM
  3. Adding Error Message
    By desibabu90 in forum Forms
    Replies: 3
    Last Post: 08-04-2011, 11:50 AM
  4. New tables created in a loop causing error
    By shubhamgandhi in forum Programming
    Replies: 2
    Last Post: 07-20-2011, 05:16 PM
  5. Replies: 1
    Last Post: 02-25-2011, 11:32 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