I have a form named "Employee Absence". This form is linked to a table that lists each absence. (This table is differnet from the one mentioned below) In the "Employee Absence" form there is a drop down box for selecting the type of absence an employee used. The options are Sick Leave, Unpaid, Vacation and a few others.
In another Table called "Employee Information", I have the Employee's name, hire date,...
User Profile
Collapse
-
Form selection subtracted from other table.
-
Woo Hoo! Much Praise to Mary. I finaly got it to work. I just had to remove the ) from the 7). Just a few touch ups and I think this small database will be ready to leave my hands.
Thanks Again.
Todd -
Thanks so much for the help. I think this should work, but I am getting an error.
Code:Do Until tmpDate = Me!ReturnDate If Weekday(tmpDate) NOT IN (6, 7) Then tmpDays = tmpDays + 1
Leave a comment:
-
Calendar Work
Here is the code I have so far.
Code:Private Sub Command17_Click() Dim intHours As Double Dim intTrial As Double Me.DaysGone = DateDiff("d", [LeaveDate], [ReturnDate]) intHours = DaysGone * 8 HoursGone = intHours End Sub
-
Umm..what does superfluous mean? no need for the ( ) or should i not even worry about it?...Leave a comment:
-
Every 10 units, i need to subtract 3 Units. If 9 or 8 units is selected, then nothing needs to be done, other then keeping that 9 or 8. If 11 is done, then i need the 3 subtracted for the 10 then added with 1....Leave a comment:
-
One line of math perhaps?
I have a somewhat simple math function i would like to preform. For every 10 units selected into one field, I need 3 subtracted from. So if 30 units is selected, then 9 is subtracted from that 30 before being dumped into its resting field.
Hopefully its not too complicated, but it was more then I could figure out at the time. -
What do you mean by "How many days you want to go forward (+)"?
The dates that I am working with are selected in two fields. One being the leave date and the other return date. The amount of days I want go forward is based on the difference between those two fields.
Is there another bit of code i need to stick in there to patch it all together?Leave a comment:
-
Code:'MoveWD moves datThis on by the intInc weekdays. Public Function MoveWD(datThis As Date, intInc As Integer) As Date MoveWD = datThis For intInc = intInc To Sgn(intInc) Step -Sgn(intInc) MoveWD = MoveWD + Sgn(intInc) Do While (Weekday(MoveWD) Mod 7) < 2 MoveWD = MoveWD + Sgn(intInc) Loop Next intInc End Function
Leave a comment:
-
I have spoke with the HR department, about the holidays and they said that, they could manually do everything else, but if I could get the weekends to subtract from my total number of days. Like every 7 days, then subtract 2 days or something. Either way, it makes my task a little less daunting knowing that I don't have to figure out the holidayz
ThxLeave a comment:
-
So, where you have the "YourDate", I would switch with "LeaveDate" and "ReturnDate " Those being the fields that hold the dates in my app.
If Weekday([LeaveDate]) = 7 Or If Weekday([LeaveDate]) = 1Then
???? Week = 5 days? Then I would have to send 5 days plus any other days from the following week, to my "DaysGone" field. Something isnt making sense....could you by chance give me...Leave a comment:
-
Im still a newbie programer, but I believe .c is a Language C file. Atleast, when I went through C, we put .c at the end of our files, and .cpp at the end of C++ files.
*shrugs*Leave a comment:
-
Dates and Holidays. I need direction
Back again, thirsting for knowlege. :)
http://www.thescripts.com/forum/show...76#post2314976
Was my last thread. I am still working on the same project, but a different stage.
I now have my form, subtracting the leave date, and return date. The result is then sent to my "DaysGone" box and then its value is multiplied by 8 (8 hours in a workday) and then send to "HoursGone" ... -
Awesome! Thanks Mary, your an angel.
It works great now, much thanks.Leave a comment:
-
Code:Me.DaysGone = DateDiff ('d', [Leave Date], [Return Date])
I am not having any luck getting this to work. I keep getting an error, wich takes me to the (' just before the d',[Leave Date]
Other questions: What is the Me. ??
Sorry to be a pain ;)Leave a comment:
-
It seems that there are a few ways to do it. A bit more information might be helpful. I have two computers and a x360 that connect to a $40 linksys (wal-mart bought) router. I have Quest High speed inet. It comes in through a phone line to my quest modem. From there the connection goes to the router, and then both computers and the xbox can be online at the same time.
Thats how it worked for me, but as I said....I am not sure how...Leave a comment:
-
I believe there are a few methods of doing so, however my work computer doesnt have the access to let me test them. I do know for a fact, that if you do a WHOIS search for the domain name, you can often find the ip adresss and other information on the site of your choice.
Just type in WHOIS in google, and it will bring up some WHOIS search databases. I'll reply again if I find those other ways how....Leave a comment:
-
Thanks for the help, though I am still missing something. I have my "LeaveDate" and "ReturnDate " fields, and the calendar coded as so;
Code:Option Compare Database Option Explicit Dim nlbOriginator As ComboBox Private Sub LeaveDate_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) Set nlbOriginator = LeaveDate Calendar.Visible = True
Leave a comment:
-
Using VBA. Trying to subtract dates from one another.
I am using windows 2000pro with access 2000.
I am trying to make a database for our HR department, that would allow our HR Director to type in an employee's ID number into a form and then select the dates the employee took off from work.
(I have the calander add-in 8.0 setup to easily select the dates already) There are two Date Fields, "Leave Date", and "Return Date" where the calander selections...
No activity results to display
Show More
Leave a comment: