Results 1 to 5 of 5
  1. #1
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919

    Unbound text boxes show #ERROR on data entry line


    As seen in the image below, the new record line is showing "#ERROR" in four of the unbound text boxes being calculated. Any ideas on how to approach this situation where the "*" new data entry line text boxes are empty, null or otherwise blank. (This is a continuous form)

    Thanks,
    Bill

    Click image for larger version. 

Name:	NewRecError.jpg 
Views:	11 
Size:	181.3 KB 
ID:	19231

  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,929
    Could try Nz().

    Is InvstID in the form's RecordSource?

    =DSum("Share", "Ledgers", "InvstID=" & Nz([InvstID],0))
    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
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919
    Is InvstID in the form's RecordSource?

    Yes, that's the killer in all of this in that all of the calculation expressions contain record field names that essentially do not exist until there's a record, hence the errors.

    I was trying to complete the development of this form using the "*" new line for data entry, largely for consistency with the rest of the user actions. I have other methods of introducing new records into a continuous form display and will pursue one of those methods if someone doesn't see a way to solve this.

    Bill

  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,929
    Actually, simple calcs should not error. The textbox would show blank (Null). The issue is with the DSum() trying to do a calc with incomplete search criteria. I just confirmed this in my db. The error propagates to other calcs that use the DSum() calculated value.

    I also verified that Nz() DOES resolve the DSum() error.
    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
    GraeagleBill's Avatar
    GraeagleBill is offline Experienced Old Geezer
    Windows 7 64bit Access 2003
    Join Date
    Feb 2011
    Posts
    1,919
    =[tbCurrentValue]-DSum("[basis]","Ledgers","[InvstID] = " & nz(Forms!Portfolio!InvstID,0))

    That did the trick on the 3 controls that used DSum.

    Thanks,
    Bill

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

Similar Threads

  1. Unbound Text Box with line break
    By DCV0204 in forum Forms
    Replies: 3
    Last Post: 01-24-2014, 09:32 AM
  2. Replies: 3
    Last Post: 12-17-2013, 05:14 AM
  3. Using Unbound text boxes
    By rbiggs in forum Reports
    Replies: 4
    Last Post: 08-16-2011, 04:05 PM
  4. Unbound Text boxes
    By kyleg222 in forum Forms
    Replies: 2
    Last Post: 08-02-2011, 12:53 PM
  5. Replies: 0
    Last Post: 05-03-2011, 05:58 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