Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2016
    Posts
    8

    Angry Unanswered: Calculate 10% Fee in Access for a query

    Hello,

    I am new to access and i am trying to do a calculated field in one of my query's.I want the field of payment to give me the the 10% fee of the payment total. What i tried was 0.10* [Payment] in the build function. What am i doing wrong?

  2. #2
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    495
    Provided Answers: 24
    That is correct. What is it doing?
    IF [Payment] IS null then you will get null. so use: 0.10* NZ([Payment])

  3. #3
    Join Date
    Jun 2016
    Posts
    8

    Access

    Thanks for the reply.

    When i try to run the query a enter parameter value box comes up. Then when i hit okay, no results show for the query. Do i need to group something for the results to show? Here is the image:
    Click image for larger version. 

Name:	Capture1.JPG 
Views:	3 
Size:	76.3 KB 
ID:	16979

  4. #4
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you have put the calcuation as part of the criteria for that column

    instead

    AssociationFee: 0.10* NZ([Payment])
    I'd rather be riding on the Tiger 800 or the Norton

  5. #5
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    but thsi is a dodgy way of doingthings


    waht happens if say soemone decides the fee shoudl change....

    if the %ge fee is defined within a table somewhere, as opposed to hardcoded in a query users can change it as required. the effect means no development impact when suich changes happen.

    also if there is a change because its data defined as opposed to schema (query) defined you cna use the same approach in multiple queries
    I'd rather be riding on the Tiger 800 or the Norton

  6. #6
    Join Date
    Jun 2016
    Posts
    8

    Thanks

    Quote Originally Posted by ranman256 View Post
    That is correct. What is it doing?
    IF [Payment] IS null then you will get null. so use: 0.10* NZ([Payment])
    This worked and figured out what i was doing wrong. I was also putting the formula in the criteria area instead of the Field box. Thanks again.

Posting Permissions

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