Access bug or design flaw?
Hey all,
I have been working on an Access database, and tried to follow the 3NF rules and design the database the best way I could but now I am stuck with an error about relatioships, I think. I have an employee table for all my employee information. There are 3 kinds of employees, such as clrek, managers, and staff. Each employee can take many different vacation days. There are different kinds of vacations. There are different vacation hours associated with each vacation and employee type. For example a manager can take a single day for 8 hours and a clrek can take a single day but for 7 hours only. So I have 4 tables:
-------------------------------------------
legend:
table name
+ is for PK
- is for other fields (FK)
-------------------------------------------
employee
+employeeID (number)
-employeeTypeID (number)
employeeType
+employeeTypeID (autonumber)
-employeeTypeName (text)
vacationDate
+vacationID (autonumber)
-employeeID (number)
-vacDate (date)
-vacationTypeID (number)
vacationType
-vacationTypeID (autonumber)
-vacationHours (number)
-employeeTypeID (nubmer)
I'd like to believe that this is a good design in 3NF. You can correct me on that if I'm wrong, but my main problem is with the forms not the tables. In the form where the user is supposed to enter the vacation dates, I have employee table as the source then I have a subform which its source is a query on vacation dates. So far so good, but on the subform, which is a continuous form, I have a control (text or combo box). The problem is that I cannot make new records and I recieve this error:
"The current field must match the join key '?' in the table that serves as the 'one' side of the one-to-many relatioship. Enter a record in the 'one' side table with the desired key value..."
Any response would be appreciated.
Thank you,
Sam
__________________
Sam Gharnagh
Jr. Programmer Analyst at MOH
Comp Sci at UofW
|