I'm very new to Access and as such I'm having great difficulties with this.
I'm having a problem with the Children attendance form, since the primary key is an autonumber, so when I'm trying to input attendance info(absent/present, children name etc) it tell me that no duplicates are allowed, also I can't seem to figure out an easy way to input the attendance for each child daily.
The employee attendance form I would like a calculation done for total hours worked for a particular day after the Time in & time out hours are entered.
Also if there is a statutory deduction like income tax & National Insurance from total wages...where can I put in these fixed values in percentage?
I looked at your database and checked out the "frmAttendance". I noticed that when I tried to select Yes/No from the Attended ComboBox that it defaults to "NO". However, when you click to arrow to drop the box down to make a selection, there is no "YES/NO" instead it has "Present" and "Absent" and you placed that in the ControlSource for that object. In the Table you have Yes/No. In your PropertySheet for that field go to the DataTab and then RowSource and put: "Yes";"No" That will take care of that problem for you. I have yet to figure out what is the problem with your command buttons on your forms but will check them out again when I reload Access. I hung and closed on me.
anyhow, that is one thing you can do to tweak your program.
Thanks Bud. I changed the text box to "yes", "No". But I still have a problem with the attendance form its not allowing me to enter the child name more than once and I need to do that if I'm going to enter the attendance daily. Also the same goes for Employee attendance.
No you aren't doing anything wrong. You can't have a Primary Key in Access unless it is Indexed with No Duplicates. Also the suggestion of the date as a primary key won't work because you will have the same date multiple times. Here is a solution:
Open your table TblChildrenAttendance in Design Mode. From the View section of the Menu Bar, select Indexes. Delete the indexes listed and then in the Index Name field, enter ChildDate and in the Field Name select ChildID and select Ascending for the Sort Order. On the next row, leave the Index Name empty and then in the Field Name select Date and select Ascending for the Sort Order. Click in the cell that says ChildDate and set the Primary Value to Yes and Unique should set to Yes. This will allow you to enter additional records for a child as long as there isn't already one for that child on that same date, which should not be a possibility since this is just an Attend Yes/No tracker.
Last edited by buckeye_td; 11-18-04 at 13:12.
Reason: Attached snapshot of Index