473,387 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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.
Jan 18 '12 #1

✓ answered by Mariostg

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_Date, Transaction_type, amount. Transaction_type 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.

7 2781
Mariostg
332 100+
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 "accumulated" days but I take/took three. How is this monitored? Is it allowed?
Jan 18 '12 #2
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.
Jan 19 '12 #3
Mariostg
332 100+
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_Date, Transaction_type, amount. Transaction_type 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.
Jan 19 '12 #4
yes exactly mariostg,so can you please help with me the code or the query?..please.
Jan 19 '12 #5
Mariostg
332 100+
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.
Jan 19 '12 #6
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.
Jan 19 '12 #7
Mariostg
332 100+
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.
Jan 19 '12 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: David Morgan | last post by:
Hi Hopefully the subject says it all. Given a weekday, (1 to 7) and an occurrence with in a month, (1 to 4), I need to ascertain the date on which it first occurs in any given month and year. ...
1
by: Need Helps | last post by:
Hello. I'm writing an application that writes to a file a month, day, year, number of comments, then some strings for the comments. So the format for each record would look like:...
6
by: Beren | last post by:
Hello, I need to run a routine every first day of the month, even when there is no page request. What would be the best way of achieving this ? A cache variable ? Thanks, Beren
7
by: burnside | last post by:
Hi - long time viewer, first time poster i have a car booking system that stores the startdate and the enddate of a booking as well as car/customer details. i want to produce an efficiency report...
2
by: arulkumara | last post by:
Hi, I want to insert a particular row into a table for every month of beginnging date like 1-11-2007,1-12-2007. for that which one is best triggres or batch jobs. please...
1
by: rahia307 | last post by:
hi i want to create email function every month at 25 date. how can i create it. if any one have any idea about it help me.
2
by: rsen | last post by:
I have a simple SQL server table with 4 fields - id, date, transactions. I want to create an additional column that gives the ranking of each record within that month based on the number of...
2
by: m2babaey | last post by:
Hi I was wondering how I can get the maximum actual value of the number of days that fall in a month For example, for April 2008, how many days it is. My python code requires this Thanks for your...
0
mickey0
by: mickey0 | last post by:
Hello, almost all methods of Date class are deprecated. So what I need is: get the actual date, get the number of the days in a month (July has 31 days) and get the day of the week of the 1st of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.