Results 1 to 4 of 4
  1. #1
    Helponaccess is offline Novice
    Windows 10 Access 2007
    Join Date
    Mar 2018
    Posts
    2

    help on expression for MS Access

    Hi All,



    I've created a database to track and manage our leave application. I'm just a beginner and have limited knowledge in expression.

    I have some problems that I'm unable to resolve and hope to receive some help from this forum.
    The following are all the problems:

    1) I need to have a formula that restrict the approver from approving someone for leave when he/she does not have sufficient leave. See Lucy's sample, the leave status is (-) which shouldn't be allowed.
    2) Is there a way I can link up the leave available balance into the Leave application form so that the reviewer has an opportunity to review before deciding to approve or decline?
    3) I need a report that display in calendar format and can do the total count of how many person will be on leave on the same time. Is this possible in access?

    All advice will be very much appreciated and thanks in advance.
    Hope someone can help me. Thanks
    Attached Files Attached Files

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722

  3. #3
    Helponaccess is offline Novice
    Windows 10 Access 2007
    Join Date
    Mar 2018
    Posts
    2
    Thanks Orange. I’ve managed to build the database. But need help on the expression that link to other query

  4. #4
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,722
    Hmmm? A few things before calculations.

    Most on the forum will tell you to adopt a naming convention that does not allow embedded spaces. Spaces in names will come back to haunt you (syntax errors).
    I don't follow your table names( eg ...Listing).
    It seems there are:

    Employees
    LeaveEntitlement
    LeaveTaken
    LeaveType could include annual, training, FamilyRelated, Bereavement,medical short/long term...
    LeaveRequest

    For a given LeaveType an Employee has an Entitlement in a TimePeriod.(your org may be different)
    For an EmployeeLeaveRequest you determine the Entitlement - LeaveUsed, and the LeaveRequest Amount and Type. If the current balance of Leave Amount for the requested type is greater or equal to the current request (barring other factors --others already of leave.....not enough staff available....), then the Request would be approved. If the current balance is less than the requested amount, then the request would be denied--with a proviso that leave up to the current balance for the leave type could be considered.

    A lot of this is based on the rules of your business. And you or others know the business so should be able to design a logic diagram (a series of IF statements involving Employee, Entitlement, LeaveUsed, LeaveRequested, StaffRequirements.... leading to an Approve/Deny result).

    Good luck with your project.

    Update: Just notice this is cross posted
    @ http://www.utteraccess.com/forum/ind...ic=2048148&hl=

    When you cross post, tell the forum that you have done so. Include a link to the other post to prevent readers, who are all volunteers, from wasting time trying to solve an already solved issue.

    Read this link for more info on why and how to cross post.
    Last edited by orange; 03-11-2018 at 05:08 PM. Reason: spelling

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

Similar Threads

  1. Replies: 2
    Last Post: 11-16-2017, 03:33 AM
  2. New to Access. Expression question
    By Kirstee in forum Forms
    Replies: 5
    Last Post: 09-01-2017, 01:46 PM
  3. Replies: 4
    Last Post: 05-03-2016, 01:51 PM
  4. Replies: 2
    Last Post: 11-20-2012, 03:21 AM
  5. IIF Between Expression in Access 2003
    By kwilliams5675 in forum Queries
    Replies: 2
    Last Post: 06-23-2011, 02:56 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