+ Reply to Thread
Results 1 to 4 of 4

Syntax to Calculate Amount in Query Field

  1. #1
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Syntax to Calculate Amount in Query Field

    I have a query with a field containing the "Amount Due" and another with "Amount Paid" I am trying to return the :Balance Due" in a third field. All fields are in the same query "QryJobHIstory". I keep getting a syntax error and I cant seem to find the problem.

    Can someone provide the proper syntax?

    Jim O

    As a beginner in Access I hope I have provided the necessary information, if their are any questions please let me know.


    Edit:
    I must have hit the wrong button and cut my title short somehow.

    As a start I have the field name and beginning of the expression as follows, without the quotes, "Balance Due:[AmountDue]-[TotalPaid]".
    Last edited by JO505; 11-21-2013 at 04:41 PM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Amount

    Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution.

    Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.

    To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    05-10-2011
    Location
    Central Ohio
    MS-Off Ver
    Excel 2000, and 2010
    Posts
    654

    Re: Syntax to Calculate Amount in Query Field

    I found out my problem, one of the fields had a null value. when I entered a 0, all is well.

    Jim O

    It is a long learning curve.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643
    Jim

    To deal with Null values take a look at Nz and Is Null.
    If posting code please use code tags, see here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Folder has X amount of jpeg files. How to automate creating links for those X amount of fi
    By JPWRana in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-24-2013, 09:50 AM
  2. Replies: 3
    Last Post: 08-04-2013, 09:40 PM
  3. [SOLVED] In pivot match vertical row amount with the horizontal column -amount and highlight that
    By Goku in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2013, 02:04 AM
  4. Replies: 5
    Last Post: 09-30-2010, 08:02 PM
  5. How can I calculate amount of time left based on amount spent?
    By KLD in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-23-2006, 11:25 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1