Results 1 to 5 of 5
  1. #1
    thewake is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2014
    Posts
    3

    Help with totals based off form selection

    Hey all,



    I could do with some help. ..I'm making a basic db to monitor annual leave.

    I have a table of staff info (name, staff no etc) and a form which is the front end for it.

    In that table I have included their annual leave entitlement as a numerical field.

    In another table I am monitoring their leave entries and again i have a front end form for this and on this leave form I choose my staff member on a drop down and enter their dates of leave etc.

    What I want is a text box on the second form (the leave entry one) that auto updates to pull through their entitlement from the staff entry table based on which staff member is selected in the drop down. This will enable the user to see at a glance what the currently selected staff member has as a total entitlement.

    Eventually ill make it so the entitlement reduces as leave is recorded. ..but for now I'm more concerned with making the entitlement pull through to the leave entry form.

    Hope that all makes sense.

    Thewake

  2. #2
    SMC's Avatar
    SMC is offline Master Ninja
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Columbus, OH
    Posts
    28
    Is entitlement, the total amount of leave that the staff member is allowed?
    And the ultimate goal is to have entitlement = (starting entitlement - leave taken)?

  3. #3
    thewake is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2014
    Posts
    3
    That's the ultimate yup. And the figure is a real time up to date figure viewable by the user when completing the leave entry form

  4. #4
    SMC's Avatar
    SMC is offline Master Ninja
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2012
    Location
    Columbus, OH
    Posts
    28
    I don't really have as much time as I thought I would to create a mock db for you. I might get to it later tonight.

    I would have a query that pulls the difference between leave date and return date to create a column.

    You can then sum that column in another query which will be based off of the name in the Leave Entry form. Select the name, type in leave date, type in return date. Once the return date is typed in have the query run and that will produce a column that will give you a total for the amount of leave taken by that employee.

    The remaining entitlement can then be coded to pull the Annual Entitlement number in the "Staff" table and subtract from it the summed value that the query pulls.

  5. #5
    thewake is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Aug 2014
    Posts
    3
    Many thanks. ...I'll try you walk through as soon as a I can. I appreciate the help

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

Similar Threads

  1. Replies: 24
    Last Post: 02-11-2014, 06:41 AM
  2. Replies: 7
    Last Post: 07-11-2013, 10:45 AM
  3. Replies: 4
    Last Post: 05-29-2013, 01:29 AM
  4. Replies: 1
    Last Post: 10-25-2012, 12:58 PM
  5. Replies: 6
    Last Post: 02-24-2011, 03:24 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