adding two days every month end

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fannie Dlamini
    New Member
    • Jan 2012
    • 4

    adding two days every month end

    hi guys
    am creating a leave system in an access form,i want it to add automatically two days to employees every month(thats if the employee has not taken days),for example if today's date was the 1st june,in April and May i've not taken any days off then the system should reflect on the 'days have' record that i have 4 days in total currently.

    if the employee takes a day off then it should be subtracted from the days accumulated from the 'days have' record.

    All in all the employees have 2 days for leave every month.
  • Mariostg
    Contributor
    • Sep 2010
    • 332

    #2
    Hi Fannie, watch out for double posting... You posted two messages that obviously are the same :)

    Some clarification required, what if someone wish to take more days than what's available. Exemple, I have two "accumulate d" days but I take/took three. How is this monitored? Is it allowed?
    Last edited by Mariostg; Jan 18 '12, 02:56 PM. Reason: typos.

    Comment

    • Fannie Dlamini
      New Member
      • Jan 2012
      • 4

      #3
      Hello Mariostg
      yes it is allowed depending on the days you have currently,it is not if you have less than the three.Lets say u have accumulated 2 days and you take three.Basically i need to add and subtract days from the 2 days accumulated monthly.
      your help is much appreciated.

      Comment

      • Mariostg
        Contributor
        • Sep 2010
        • 332

        #4
        So you could probably implement something similar to a bank statements with debit and credits.
        Say you have a table Transactions. Setup a few fields like TransactionID, personID, Transaction_Dat e, Transaction_typ e, amount. Transaction_typ e would be either credit (the 2 free monthly leave) and debit being anything the person would use.
        Every month, you could run a query to credit the leave.

        This way, you would have a history of all the leave transactions. And you could actually create other transaction types like sick leave, compensatory, etc.

        Comment

        • Fannie Dlamini
          New Member
          • Jan 2012
          • 4

          #5
          yes exactly mariostg,so can you please help with me the code or the query?..please.

          Comment

          • Mariostg
            Contributor
            • Sep 2010
            • 332

            #6
            Fannie, I cannot do the whole work for you. But me or anybody else around here will gladly help you with any problems you may encounter during the development of your new tool.

            So I suggest you start by creating your database structure. there will likely be more than one table. You are in the best seat to decide what you need. Then you will need some queries to report, append, update, delete data. Once this is all working out, then you can move on to your user interface.

            Just start a new thread for more specific questions.

            Comment

            • Fannie Dlamini
              New Member
              • Jan 2012
              • 4

              #7
              thank you for your time...but in this case just needed an example of a query that runs every month then i will do the rest myself.

              Comment

              • Mariostg
                Contributor
                • Sep 2010
                • 332

                #8
                Fannie, I understand you concern, but you cannot really put the horse ahead of the cart. :) It is rather tricky to provide, even as an exmple, a query that will execute what you want even before your own requirements are better known.

                You will likely have to familirize yourself with SQL syntax. Statements like INSERT INTO and UPDATE will be important to you. The design view of Access can help you design those. But for that, you need table structure.

                Comment

                Working...