By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,455 Members | 2,157 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,455 IT Pros & Developers. It's quick & easy.

adding two days every month end

P: 4
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.

Share this Question
Share on Google+
7 Replies


100+
P: 332
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

P: 4
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

100+
P: 332
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

P: 4
yes exactly mariostg,so can you please help with me the code or the query?..please.
Jan 19 '12 #5

100+
P: 332
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

P: 4
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

100+
P: 332
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

Post your reply

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