| | |
Please Help!
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Apr 2007
Posts: 11
Reputation:
Solved Threads: 1
•
•
•
•
I'm new with VB and I need to write a code that will calculate days starting from a start date (x), adding (y) days per month till the present date (z), subtracting given days (i) and finally giving remain days (j). Can anyone please given some examples.
above funtions are add two date and subtract one date from other date
but here datediff function does not give proper ansr.
•
•
Join Date: May 2007
Posts: 15
Reputation:
Solved Threads: 0
This is not a school project. I've designed a Data Base using MS ACCESS for my work and I need to create something that will calculate more or less the exact leave credit days of each person at work. That is why I want to use VB for that purpose. Please help me with any suggestion or examples that I can use. By the way, I' new with the VB. Please help me.
my email is snipped.
Thanx
my email is snipped.
Thanx
Last edited by WaltP; May 17th, 2007 at 1:40 pm. Reason: Do not post emails on the board. Spammers love that!
•
•
Join Date: May 2007
Posts: 15
Reputation:
Solved Threads: 0
•
•
•
•
My apologies - the post sounded like a school project. Where are the dates and day coming from, fileds, forms, etc? What are you going to do with result, display or store in a field ?
I'll try and suggest some code this evening.
The dates and day are coming from :
1. Starting Date(x) : The date when the member started working,
2. Adding days per month(y) : Are days that are leave days added per month to each member,
3. Present Date(z) : Is the present date,
4. Given Days(i) : Are days that the member take when going on leave ,
5. Remain Days(j) : Are days that the member will have left after taking a leave.
The result I want to store and desplay in field that will deplay the total leave credit days a member has on the form that will deplay his/her personal details.
Thanx again.
•
•
•
•
The dates and day are coming from :
1. Starting Date(x) : The date when the member started working,
2. Adding days per month(y) : Are days that are leave days added per month to each member,
Yes, the function
Date() will return the present date•
•
•
•
4. Given Days(i) : Are days that the member take when going on leave ,
•
•
•
•
5. Remain Days(j) : Are days that the member will have left after taking a leave.
•
•
•
•
The result I want to store and desplay in field that will deplay the total leave credit days a member has on the form that will deplay his/her personal details.
Total leave days accumulated
Leave days taken
Leave days left
I'd recommend storing only leave days taken. The other two can easily be calculated when you need the values.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
Please Read This
I'm having to decipher what you are asking, which means I dont understand the question fully. Please explain exactly the scenario so we are clear -- after you read the above link.
I'm having to decipher what you are asking, which means I dont understand the question fully. Please explain exactly the scenario so we are clear -- after you read the above link.
The 3 Laws of the Procrastination Society:
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
1) Never do today that which can be put off until tomorrow
2) Tomorrow never comes
•
•
Join Date: May 2007
Posts: 15
Reputation:
Solved Threads: 0
What I've meant was that the previous reply to my questions was understood and although I haven't test I got the picture. Now what I'm asking is that after I created that code how will I make it to update itself(adding days per month (y)) that will give the exact Leave Days Left of a member, that will be desplayed in the field that will show the total leave days of the member after all the calculations. Atually how will I loop this problem. If my explanation is not clear, please notify me sothat I try to explain from the start.
Please bear with me as I'm new in using the virtual basics.
Thanx.
Please bear with me as I'm new in using the virtual basics.
Thanx.
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: use vb in network application
- Next Thread: Archive MSaccess data into a different Access DB
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age append application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine table tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows






