Results 1 to 5 of 5
  1. #1
    Milade8080 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    18

    Question Form To Calculate The Fines ....

    Hi
    I need a form to calculate the fines as follows:


    TXTBOX1 ---> Specified date to pay taxes


    TXTBOX2 ---> Amount of tax
    TXTBOX3 ---> Date on which the tax is paid
    TXTBOX4 ---> The amount paid for taxes
    TXTBOX5 ---> Calculation Date
    Txt Box6 ---> Amount of fines
    --------------------------------------------------------------
    IF (TXTBOX1>=TXTBOX3) And (TXTBOX4=TXTBOX2) --> Txt Box6= 0
    IF (TXTBOX1>=TXTBOX3) And (TXTBOX4<TXTBOX2) --> Txt Box6= (TXTBOX2-TXTBOX4)*0.02* distance between two dates TXTBOX1 and TXTBOX5 by month
    IF (TXTBOX1<TXTBOX3) And (TXTBOX4=TXTBOX2) --> Txt Box6= (TXTBOX2*0.02* distance between two dates TXTBOX1 and TXTBOX3 by month
    IF (TXTBOX1<TXTBOX3) And (TXTBOX4<TXTBOX2) --> Txt Box6= (TXTBOX2*0.02* distance between two dates TXTBOX1 and TXTBOX3 by month
    + (TXTBOX2-TXTBOX4)*0.02* distance between two dates TXTBOX3 and TXTBOX5 by month

  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
    53,641
    You are showing Excel syntax for If() function. In Access it would be:

    IIf(this condition true, do this, else do this)

    As one example using your info, something like this in ControlSource property of TXTBOX6:

    =IIf(TXTBOX1 >= TXTBOX3 AND TXTBOX4 = TXTBOX2, 0, do something else)

    Should be able to nest up to 7 IIf() levels.
    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
    Milade8080 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Mar 2014
    Posts
    18
    Thanks
    you can build this form for me???


    TXTBOX1 ---> Specified date to pay taxes
    TXTBOX2 ---> Amount of tax
    TXTBOX3 ---> Date on which the tax is paid
    TXTBOX4 ---> The amount paid for taxes
    TXTBOX5 ---> Calculation Date
    Txt Box6 ---> Amount of fines
    --------------------------------------------------------------
    IF (TXTBOX1>=TXTBOX3) And (TXTBOX4=TXTBOX2) --> Txt Box6= 0
    IF (TXTBOX1>=TXTBOX3) And (TXTBOX4<TXTBOX2) --> Txt Box6= (TXTBOX2-TXTBOX4)*0.02* distance between two dates TXTBOX1 and TXTBOX5 by month
    IF (TXTBOX1<TXTBOX3) And (TXTBOX4=TXTBOX2) --> Txt Box6= (TXTBOX2*0.02* distance between two dates TXTBOX1 and TXTBOX3 by month
    IF (TXTBOX1<TXTBOX3) And (TXTBOX4<TXTBOX2) --> Txt Box6= (TXTBOX2*0.02* distance between two dates TXTBOX1 and TXTBOX3 by month
    + (TXTBOX2-TXTBOX4)*0.02* distance between two dates TXTBOX3 and TXTBOX5 by month

  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
    53,641
    No, I cannot build for you. You can build and post your attempts for analysis.
    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
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    Hint.......

    For this part of the calculation:
    distance between two dates TXTBOX1 and TXTBOX5 by month

    use the DateDiff() function....

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

Similar Threads

  1. calculate discount and gross margin in form
    By tommyried in forum Programming
    Replies: 7
    Last Post: 03-09-2014, 12:28 AM
  2. Form won't calculate totals
    By Justin.ITPro in forum Forms
    Replies: 5
    Last Post: 02-07-2014, 04:13 PM
  3. Calculate distance using fields in form
    By wnicole in forum Access
    Replies: 1
    Last Post: 09-28-2013, 09:05 AM
  4. Calculate a field in a form
    By alscompany in forum Forms
    Replies: 4
    Last Post: 02-28-2012, 03:09 PM
  5. How to calculate a percentage on form
    By jrockusa in forum Forms
    Replies: 1
    Last Post: 03-31-2010, 01:53 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