Results 1 to 6 of 6
  1. #1
    kamkikorich77 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Posts
    3

    Formula In Access

    I have a contribution form than have

    Month/Year: 9/2014


    CompanyName: ABC Ltd
    StaffName: Jack Daniel
    DOB + AGE: 13/10/1977 + ??
    MonthlySalary: 800
    Contribution:??
    Total:?? (If have many staff)

    And for this i have to refer schedule: exp Salary Range More 800 but not exceed 900: contribution:19.10 (Below 60 Year), 10.60 (60 year and above)

    Thanks in advance.

  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,772
    Maybe:

    IIf(MonthlySalary > 800 And MonthlySalary < 900, IIf(DateDiff("yyyy", DOB, Date())<60, 19.10, 10.60), Null)

    Calculate the Total in textbox in report footer section.
    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
    ssanfu is offline Master of Nothing
    Windows XP Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    There are many age calculation routines....

    Google: VBA age Calculation

    Here are two:
    http://www.fmsinc.com/microsoftacces...alculation.asp
    http://allenbrowne.com/func-08.html

  4. #4
    kamkikorich77 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Posts
    3
    Thanks... for the reply.... really hard subject for me.

  5. #5
    kamkikorich77 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Nov 2014
    Posts
    3
    Hi i have sucess using this formula: Caruman: IIf([GajiKasar]>700 And [GajiKasar]<800,IIf([Umur]>60,16.9,IIf([Umur]<60,9.4))), But how when using schedule... more range of salary...

    Pls take look to my sample

    QueryJadualCaruman
    QueryStaffContribution
    Attached Files Attached Files

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,772
    Cannot join tables on autonumber fields. Autonumbers are independently generated and have no relationship to each other. An autonumber field can be designated as a primary key then that value would be saved in another table number type field as foreign key. You need to understand primary and foreign keys before continuing.

    I can figure out what some of the fields are for (name, date, telephone, post code) but because of language cannot figure out what tables are for and how they relate. I think I recognize the salary range schedule table but nothing beyond that.
    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.

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

Similar Threads

  1. Replies: 41
    Last Post: 05-29-2015, 02:58 PM
  2. Access formula
    By Zeebow in forum Programming
    Replies: 3
    Last Post: 10-03-2014, 02:07 PM
  3. Access formula
    By Sujathajosh in forum Programming
    Replies: 2
    Last Post: 08-21-2014, 11:32 AM
  4. Help with Access Formula
    By tdawn in forum Access
    Replies: 5
    Last Post: 03-24-2013, 11:43 AM
  5. Max formula in Access
    By mohsin74 in forum Programming
    Replies: 2
    Last Post: 12-26-2006, 07:21 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