millenniasp Posted December 17, 2003 Posted December 17, 2003 Okay, Let me make some changes on the 2 tables and then change the code to reflect the changes. I'll explain everything afterwards and upload the new database changes. Quote
millenniasp Posted December 17, 2003 Posted December 17, 2003 Do you want the query to calculate the hours worked? Quote
dakota97 Posted December 17, 2003 Author Posted December 17, 2003 That was actually something that I was going to work on after I got this to work, but yes if you could incorporate that I won't complain...lol Quote if(computer.speed == "slow") { hamster.feed(); } if(computer.speed == "really slow") { hamster.kill(); BuyNewHamster(); }
dakota97 Posted December 17, 2003 Author Posted December 17, 2003 Just a quick note that it is indeed working on mine now as well. I've made a few minor modifications to the SQL to get it to only display the 3 most important fields (DateIn, StartTime, and EndTime), but it is working here. One thing that I do want to do after this is ironed out is be able to make changes to the DB from the datagrid as well. I'm going to use the same setup on the EDIT form as the VIEW form, so it shouldn't be too difficult....I hope. I await your modifications Quote if(computer.speed == "slow") { hamster.feed(); } if(computer.speed == "really slow") { hamster.kill(); BuyNewHamster(); }
millenniasp Posted December 17, 2003 Posted December 17, 2003 Okay, I am going to upload both the solution & the database, just give me a minute to zip them up. One thing I did was change the EmpID from a text field to an autonumber and set that as primary key on the Employee table On the timeIN table I added a primary key (autonumber) and set that as a primary key for that table. I changed the EmpID field from text to number and built a relationship between the two tables on the EmpID field. I changed the query to view the table in the datagrid so it's not showing all the fields, the fields that are shown are: 1) Name - which is a concatenation on FName & LName from the employee field 2) DateIn- shows the date 3) StartTime and EndTime fields 4) Hours Worked is EndTime - StartTime 5) Locked I made the datagrid a bit larger to see all the fields and centered on the form a bit better. now I need to figure out how to upload the files LOL Quote
millenniasp Posted December 17, 2003 Posted December 17, 2003 here is the databasetimeclock.zip Quote
millenniasp Posted December 17, 2003 Posted December 17, 2003 I think HoursWorked should be StartTime - EndTime. I could have those backwards, but you can change them as you see fit. Quote
dakota97 Posted December 17, 2003 Author Posted December 17, 2003 Ok...looks great...one problem on my end though...I'm going to have to go through my code again and adjust for the changes in the DB fields, and how the program originally inserts the employee information and time data. I'll play around with it throughout the day and let you know the status hopefully by this evening. Again, I can't thank you enough for the time you've put into helping me get through this. I'll let you know how I make out. Thanks, Chris Quote if(computer.speed == "slow") { hamster.feed(); } if(computer.speed == "really slow") { hamster.kill(); BuyNewHamster(); }
millenniasp Posted December 17, 2003 Posted December 17, 2003 No problem, just let me know if I can be of further assistance! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.