Results 1 to 5 of 5
  1. #1
    aparnawangu is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2015
    Posts
    40

    sum of 2 textboxes should be displayed in third textbox

    Hi Friends,


    I need a help regarding calculating sum of two textboxes and displaying in a third textbox.How to do that?
    Pls suggest.


    Thanks in advance
    Aparna

  2. #2
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    in the controlsource of the third textbox put

    =nz([Textbox1],0)+nz([Textbox2],0)

    where Textbox1/2 are the names of the boxes you want to add

    the nz function is used in case either of those controls are null

  3. #3
    aparnawangu is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jul 2015
    Posts
    40
    Hi,
    Thanks much for help,but the formula which you mentioned above is combining the values rather than suming them up.
    eg:textbox1:24,textbox2:1 then Textbox3 showing result 241.Its not adding the values.

    One more requirement.I have check boxes connected with Textboxes.I want that only those textboxes values should get displayed whose check boxes i will select(Highlighted One).Pls help me with these requirements.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,641
    Are textboxes 1 and 2 bound to number type fields?

    Are the checkboxes bound to a yes/no field?

    Why do users need to manage display of textboxes?
    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
    CJ_London is online now VIP
    Windows 8 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,845
    Thanks much for help,but the formula which you mentioned above is combining the values rather than suming them up.
    eg:textbox1:24,textbox2:1 then Textbox3 showing result 241.Its not adding the values.
    sounds like the controlsources for your textboxes are text and not numbers

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

Similar Threads

  1. Replies: 5
    Last Post: 04-30-2015, 01:50 AM
  2. Count displayed in textbox
    By cbende2 in forum Access
    Replies: 5
    Last Post: 01-06-2015, 04:28 PM
  3. Replies: 7
    Last Post: 06-04-2013, 01:10 PM
  4. Replies: 2
    Last Post: 04-20-2013, 03:37 AM
  5. New JPGs Not Displayed
    By DJMoore in forum Access
    Replies: 1
    Last Post: 11-15-2009, 05:30 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