Results 1 to 4 of 4
  1. #1
    tottihope is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2017
    Posts
    2

    Access Subform SUM() Displays #Error for calculated field on main Access Form


    I am trying to calculate the Grand Total for my Order Items on my main order form using the SUM(). It displays on the subform itself but errorenter image description heres out on the main form. I find it hard to figure out where I went wrong after many days and my Acces skills are really beginner. Solutions suggested in the link bellow have not solve the problem. =SUM([Quantity]*[Price]) or =SUM(NZ([Amount],0))
    OrderID is the PK in the order form and orderDetailID is the PK in the Order Details form.
    Any Help would be highly appreciated MS Access Subform with fields with #Error in form view
    I am using Access 2013 on Windows 10.
    Click image for larger version. 

Name:	subform.PNG 
Views:	25 
Size:	7.3 KB 
ID:	29221

    Click image for larger version. 

Name:	subform_Parent_child_property.PNG 
Views:	27 
Size:	38.1 KB 
ID:	29220Click image for larger version. 

Name:	property_subform.PNG 
Views:	25 
Size:	7.2 KB 
ID:	29222
    Click image for larger version. 

Name:	schema.PNG 
Views:	25 
Size:	34.7 KB 
ID:	29223

  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,815
    Not seeing #Error in the image. Suggestions in what link?

    Field [Amount] referenced in GrandTotal is located where? Which control in the subform is [TotalPrice].

    Advise giving the subform container a name different from the object it holds, like ctrDetails.

    If you want to provide db for analysis, follow instructions at bottom of my post.

    Cross-posted https://stackoverflow.com/questions/...in-access-form
    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
    tottihope is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2017
    Posts
    2

    Grand total displays on Subform but not on Main Form

    Hi and thanks very much for your hints.
    I had that formula on the subform on the text field totalPrice.
    The grand total displays (hidden) on the subform itself which shows that the formula is correct and works, but for some reason I do not get, it does not display on the main form.
    Another evidence that it works is that, I was able to pass that value on the subfom to the main form and calculate the subtotal which the total for current record item details.
    I have attached the database.

    Thanks much




    Click image for larger version. 

Name:	grand_total_on_subform.PNG 
Views:	23 
Size:	15.5 KB 
ID:	29227Click image for larger version. 

Name:	presence_of_grand_total_calculation_on_main_fain_inDesignView.PNG 
Views:	23 
Size:	50.1 KB 
ID:	29226Click image for larger version. 

Name:	issing_grand_total_on_main_form.PNG 
Views:	22 
Size:	25.1 KB 
ID:	29228
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    The only time #Error shows is when there are no records in the subform. This should be expected. Instead of showing the subform total on the main form, could just have the sum show on the subform. With the mainform/subform in Form view (not Design view), click into the subform then click the Sum (looks like Sigma) button on ribbon. This will open the Total row on the subform. Or set the subform for Continuous and arrange controls to look like Datasheet.
    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. Replies: 8
    Last Post: 10-10-2016, 06:07 AM
  2. Replies: 1
    Last Post: 07-10-2015, 06:38 PM
  3. Replies: 7
    Last Post: 09-10-2014, 12:33 PM
  4. Replies: 3
    Last Post: 05-26-2013, 08:57 AM
  5. Replies: 2
    Last Post: 09-06-2011, 05:44 PM

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