Results 1 to 2 of 2
  1. #1
    markpastoril is offline Advanced Beginner
    Windows 10 Access 2013 64bit
    Join Date
    Aug 2018
    Posts
    62

    Please help,how to calculate field depending on the character/value from other field?

    Please help me with this, I am building a water billing system.



    I want to Calculate for Residential and Commercial account,

    if the customers type of connection is Residential then Amount=Consumption*15
    if the customers type of connection is Commercial then Amount=Consumption*30

    flow:
    (previous reading)-(present reading)=Consumption then we have a tariff in our office w/c determines the amount of the consumption.(I have already a code base on my tariff)


    this is the actual image of query
    Click image for larger version. 

Name:	connection type.jpg 
Views:	9 
Size:	184.7 KB 
ID:	35520

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I would have a table with the types and their related values. Then you can just join to it, and it's more maintainable.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 2
    Last Post: 09-05-2018, 11:56 PM
  2. Replies: 4
    Last Post: 01-29-2017, 05:24 PM
  3. Replies: 6
    Last Post: 01-13-2017, 08:54 AM
  4. Replies: 8
    Last Post: 05-13-2013, 06:26 PM
  5. Replies: 1
    Last Post: 02-20-2012, 01:02 PM

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