Results 1 to 4 of 4
  1. #1
    knh2r is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    25

    Subform calculation error until data entered.

    So I have a total field in my orders subform that uses an expression to find the total. Each line item price is an expression calculated using a dmin function so this is done in a query. The total is then found by dsum from the calculations query where order ids are equal. Works great except that it shows error until some character is entered on as a new line item on the subform. It can even be a space. Also works if I navigate away from the order record and back to it or if I click to select the next to last line item in the order. But when entering a new item it's error until one of those things happen. This has given me a fit and the logic behind when it happens makes me think it's a relatively easy fix but I haven't been able to get it.



    Any ideas?

    Thanks!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Are you using the Nz() function? You should be.

  3. #3
    knh2r is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jul 2016
    Posts
    25
    I've used it in various positions, but have yet to find the correct one...:/. What can I do to diagnose where it should be. And would anything go in the second variable?

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    What is the "expression" you are using to get the sum? You have a Form/SubForm arrangement, right? Why does it require a DMin() function? There may be a much easier way to get what you need.

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

Similar Threads

  1. Replies: 5
    Last Post: 06-16-2016, 11:44 AM
  2. Replies: 13
    Last Post: 01-03-2015, 08:53 PM
  3. Replies: 7
    Last Post: 11-13-2012, 01:44 PM
  4. Replies: 2
    Last Post: 07-30-2012, 03:26 PM
  5. Replies: 2
    Last Post: 05-31-2012, 02:41 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